[ 
https://issues.apache.org/jira/browse/JENA-1729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17334786#comment-17334786
 ] 

ASF subversion and git services commented on JENA-1729:
-------------------------------------------------------

Commit 1689763c589b4d8fb7fededeb6e8dc938ecbd030 in jena's branch 
refs/heads/main from Andy Seaborne
[ https://gitbox.apache.org/repos/asf?p=jena.git;h=1689763 ]

JENA-1729: Use RDF.Init during initialization


> A minor initilization issue
> ---------------------------
>
>                 Key: JENA-1729
>                 URL: https://issues.apache.org/jira/browse/JENA-1729
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Core
>         Environment: java8(1.8.0_152), jena-arq:3.12.0
>            Reporter: ssz
>            Priority: Minor
>
> The following one-class program fails with assertion error:
>  
> {code:java}
> package xx.yy;
> import org.apache.jena.rdf.model.RDFNode;
> import org.apache.jena.rdf.model.ResourceFactory;
> import org.apache.jena.sys.JenaSubsystemLifecycle;
> import org.apache.jena.sys.JenaSystem;
> import org.apache.jena.vocabulary.RDF;
> public class InitTest implements JenaSubsystemLifecycle {
>     @Override
>     public void start() {
>         if (JenaSystem.DEBUG_INIT)
>             System.err.println("InitTEST -- start");
>         assert RDF.type != null : "RDF#type is null => attempt to load a 
> graph here will fail";
>     }
>     @Override
>     public void stop() {
>         if (JenaSystem.DEBUG_INIT)
>             System.err.println("InitTEST -- finish");
>     }
>     @Override
>     public int level() {
>         return 500;
>     }
>     public static void main(String... args) { // run VM option: -ea
>         JenaSystem.DEBUG_INIT = true;
>         //RDFNode r = ResourceFactory.createProperty("X"); // this works fine
>         RDFNode r = ResourceFactory.createTypedLiteral("Y"); // this causes a 
> problem
>         System.out.println(r);
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to