Github user ajs6f commented on a diff in the pull request:

    https://github.com/apache/jena/pull/152#discussion_r70116076
  
    --- Diff: jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphOps.java 
---
    @@ -29,60 +29,49 @@
     import org.apache.jena.sparql.core.Quad ;
     
     // Combine with Jena GraphUtils.
    -public class GraphOps
    -{
    -    
    -    public static boolean containsGraph(DatasetGraph dsg, Node gn)
    -    {
    -        // [[DynDS]]
    -        if ( Quad.isDefaultGraph(gn))
    +public class GraphOps {
    +    public static boolean containsGraph(DatasetGraph dsg, Node gn) {
    +        if ( Quad.isDefaultGraph(gn) )
                 return true ;
    -        if ( Quad.isUnionGraph(gn))
    +        if ( Quad.isUnionGraph(gn) )
                 return true ;
             return dsg.containsGraph(gn) ;
         }
    -    
    -    public static Graph getGraph(DatasetGraph dsg, Node gn)
    -    {
    -        // [[DynDS]]
    +
    +    public static Graph getGraph(DatasetGraph dsg, Node gn) {
             if ( gn == null )
                 return dsg.getDefaultGraph() ;
             if ( Quad.isDefaultGraph(gn) )
                 // Explicit or generated.
                 return dsg.getDefaultGraph() ;
    -        if ( Quad.isUnionGraph(gn))
    +        if ( Quad.isUnionGraph(gn) )
                 return unionGraph(dsg) ;
             return dsg.getGraph(gn) ;
         }
    -    
    -    public static Graph unionGraph(DatasetGraph dsg)
    -    {
    +
    +    public static Graph unionGraph(DatasetGraph dsg) {
    +        // Snapshot it now.
    --- End diff --
    
    How come a snapshot here? I have no objection to it (other than the cost of 
rolling up), just wondering. Is it because of potential 
`ConcurrentModificationException`s?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to