You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
convert and load fail with a java assert exception when input is null String.
For satefy we should consider null as an empty value that returns an empty document, for both convert and load.
In the case of convert with Reader I'd keep the current exception, at most, add Objects.requireNonNull(reader, "reader"); to
so the users gets a hint of where the issue is without adding too much complexity.
java.lang.NullPointerException: reader
at java.base/java.util.Objects.requireNonNull(Objects.java:233)
at org.asciidoctor.jruby.internal.IOUtils.readFull(IOUtils.java:24)
at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(JRubyAsciidoctor.java:351)
at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(JRubyAsciidoctor.java:358)
at org.asciidoctor.jruby.ast.impl.SectionImplTest.temporal(SectionImplTest.java:28)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at
The text was updated successfully, but these errors were encountered:
Both empty and null String are accepted as valid for load/convert methods
for safety.
* Minor Javadoc fixed
* Integrate WhenDocumentIsLoaded into WhenAsciiDocIsLoadedToDocument
Fixesasciidoctor#1146
Both empty and null String are accepted as valid for load/convert methods
for safety.
* Minor Javadoc fixed
* Integrate WhenDocumentIsLoaded into WhenAsciiDocIsLoadedToDocument
Fixesasciidoctor#1146
convert
andload
fail with a java assert exception when input isnull
String.For satefy we should consider
null
as an empty value that returns an empty document, for bothconvert
andload
.In the case of convert with
Reader
I'd keep the current exception, at most, addObjects.requireNonNull(reader, "reader");
toasciidoctorj/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/internal/IOUtils.java
Line 22 in b190250
The text was updated successfully, but these errors were encountered: