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
When running the VersionDetailTest, I get the following exception with the latest ttools release (3.4.9):
Testcase: testVersions(uk.ac.starlink.ttools.votlint.VersionDetailTest): Caused an ERROR
Cannot invoke "java.io.PrintStream.println(String)" because "this.out_" is null
java.lang.NullPointerException: Cannot invoke "java.io.PrintStream.println(String)" because "this.out_" is null
at uk.ac.starlink.ttools.votlint.PrintSaxMessager.reportMessage(PrintSaxMessager.java:75)
at uk.ac.starlink.ttools.votlint.VotLintContext.warning(VotLintContext.java:257)
at uk.ac.starlink.ttools.votlint.VersionDetail.getInstance(VersionDetail.java:118)
at uk.ac.starlink.ttools.votlint.VersionDetailTest.getDetail(VersionDetailTest.java:34)
at uk.ac.starlink.ttools.votlint.VersionDetailTest.testVersions(VersionDetailTest.java:14)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
The reason seems that in VersionDetailTest, the PrintSaxMessager is constructed as
I am not sure why I create a warning here which was not in your CI tests; this may happen because of some slightly different versions (ADQLLib?); however maybe the _outl attribute should probably be checked for null before used (or a real output stream should applied in the test?)
The text was updated successfully, but these errors were encountered:
In one test case, PrintSaxMessager was constructed with a null
print stream. In my tests no messages got sent so this hadn't
caused a problem, but testing in other environments
(different JAXP implementations?) did produce some output messages,
hence resulted in a NullPointerException. Supply a non-null
PrintStream (System.out) instead. I don't know why I didn't do
this in the first place.
This bug was reported by Ole Streicher (starjava issue #67).
In one test case, PrintSaxMessager was constructed with a null
print stream. In my tests no messages got sent so this hadn't
caused a problem, but testing in other environments
(different JAXP implementations?) did produce some output messages,
hence resulted in a NullPointerException. Supply a non-null
PrintStream (System.out) instead. I don't know why I didn't do
this in the first place.
This bug was reported by Ole Streicher (starjava issue #67).
When running the VersionDetailTest, I get the following exception with the latest ttools release (3.4.9):
The reason seems that in VersionDetailTest, the PrintSaxMessager is constructed as
starjava/ttools/src/testcases/uk/ac/starlink/ttools/votlint/VersionDetailTest.java
Line 33 in 778c74a
which sets the
_outl
attribute tonull
. Any attempt to print a warning will then ofcourse create the NPE:starjava/ttools/src/main/uk/ac/starlink/ttools/votlint/PrintSaxMessager.java
Lines 74 to 75 in 778c74a
I am not sure why I create a warning here which was not in your CI tests; this may happen because of some slightly different versions (ADQLLib?); however maybe the
_outl
attribute should probably be checked for null before used (or a real output stream should applied in the test?)The text was updated successfully, but these errors were encountered: