Skip to content

Java::JavaLang::NullPointerException on JRuby #81

@rsofista

Description

@rsofista

When you don't put 'div' as a tag in the initializer like:

require 'rubygems'
require 'readability'
require 'open-uri'
    
source = open('https://developers.google.com/custom-search/docs/tutorial/creatingcse').read
puts Readability::Document.new(source, tags: []).content

it trows the error:
NullPointerException:
from nokogiri.internals.SaveContextVisitor.isHtmlScript(SaveContextVisitor.java:741)

you can put any tags you want, if you don't add 'div' the error happens

using jruby-9.1.6.0 [ x86_64 ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions