Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListingContentConverters throws a NullPointerException when converting a block with null content #10

Closed
wilkinsona opened this issue Mar 9, 2021 · 0 comments
Milestone

Comments

@wilkinsona
Copy link
Contributor

Caused by: java.lang.NullPointerException	
	at org.jruby.RubyEncoding.doEncodeUTF8(org/jruby/RubyEncoding.java:222)	
	at org.jruby.RubyString.encodeBytelist(org/jruby/RubyString.java:6361)	
	at org.jruby.RubyString.<init>(org/jruby/RubyString.java:386)	
	at org.jruby.RubyString.newString(org/jruby/RubyString.java:477)	
	at org.jruby.Ruby.newString(org/jruby/Ruby.java:3425)	
	at io.spring.asciidoctor.backend.codetools.ListingContentConverters.content(io/spring/asciidoctor/backend/codetools ListingContentConverters.java:56)

listingBlock.getContent() was returning null due to a bug in the Spring Asciidoctor Extensions. I'm not sure if it's possible to trigger the problem in a completely hand-written document so we may not see the problem again. Perhaps it's worth handling null content more gracefully anyway?

@philwebb philwebb added this to the 0.0.1 milestone Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants