arne-bdt commented on issue #2787:
URL: https://github.com/apache/jena/issues/2787#issuecomment-2436036138

   > It is difficult to test for because Jena is likely initlialized and any 
test will pass for that reason -- it isn't a test of class initialization order 
and we can not rely on the test.
   > 
   > If this is run from `public static void main`, and there is no 
`JenaSystem.ini`t call in `RDFLinkHTTPBuilder`, it should go wrong.
   > 
   > ```java
   >    public static void mainNPE2675() {
   >         System.out.println("GH-2675: RDFLinkHTTP NPE");
   >         try (RDFConnection conn = 
RDFConnectionFuseki.service("http://localhost:3030/ds";).build()) {
   > 
   >         }
   >         System.out.println("DONE");
   >     }
   > ```
   
   Great: It runs perfectly. But when `static { JenaSystem.init(); }`  is 
removed in RDFLinkHTTPBuilder, it fails with:
   `java.lang.ExceptionInInitializerError ... Caused by: 
java.lang.NullPointerException: Cannot invoke 
"org.apache.jena.rdf.model.Resource.asNode()" because 
"org.apache.jena.vocabulary.RDF.Alt" is null` 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to