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

Andy Seaborne commented on JENA-1857:
-------------------------------------

This works:
{code:java}
    public static void main(String ... a) {
        DatasetGraph dsg = DatasetGraphFactory.createTxnMem();
        Quad q = SSE.parseQuad("(:g :s :p :o)");
        dsg.add(q);
        Txn.executeRead(dsg, ()->System.out.println(dsg.size()));
    }
{code}


> DatasetGraphInMemory.listGraphNodes causes exception outside a transaction
> --------------------------------------------------------------------------
>
>                 Key: JENA-1857
>                 URL: https://issues.apache.org/jira/browse/JENA-1857
>             Project: Apache Jena
>          Issue Type: Task
>          Components: TIM
>    Affects Versions: Jena 3.14.0
>            Reporter: Andy Seaborne
>            Priority: Major
>
> Test case: 
> {code:java}
>     public static void main(String ... a) {
>         DatasetGraph dsg = DatasetGraphFactory.createTxnMem();
>         Quad q = SSE.parseQuad("(:g :s :p :o)");
>         dsg.add(q);
>         try {
>             System.out.println(dsg.size());
>         } catch (Exception ex) {
>             ex.printStackTrace();
>         }
>     }
> {code}
>  



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

Reply via email to