Skip to content

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

@wilkinsona

Description

@wilkinsona
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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions