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

    https://github.com/apache/jena/pull/94#discussion_r44455660
  
    --- Diff: 
jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphFactory.java ---
    @@ -53,45 +54,38 @@ private static void copyOver(DatasetGraph dsgDest, 
DatasetGraph dsgSrc)
          * Create a DatasetGraph starting with a single graph.
          * New graphs must be explicitly added.
          */
    -    public static DatasetGraph create(Graph graph)
    +    public static DatasetGraph create(final Graph graph)
         {
    -        DatasetGraph dsg2 = createMemFixed() ;
    +        final DatasetGraph dsg2 = createMemFixed() ;
             dsg2.setDefaultGraph(graph) ;
             return dsg2 ;
         }
    -    
    +
         /**
          * Create a DatasetGraph which only ever has a single default graph.
          */
    -    public static DatasetGraph createOneGraph(Graph graph) { return new 
DatasetGraphOne(graph) ; }
    +    public static DatasetGraph createOneGraph(final Graph graph) { return 
new DatasetGraphOne(graph) ; }
     
         /** Interface for makign graphs when a dataset needs to add a new 
graph.
          *  Return null for no graph created.
    -     */ 
    +     */
         public interface GraphMaker { public Graph create() ; }
     
         /** A graph maker that doesn't make graphs */
    -    public static GraphMaker graphMakerNull = new GraphMaker() {
    -        @Override
    -        public Graph create()
    -        {
    -            return null ;
    -        } } ;
    -    
    -    private static GraphMaker memGraphMaker = new GraphMaker()
    -    {
    -        @Override
    -        public Graph create()
    -        {
    -            return GraphFactory.createDefaultGraph() ;
    -        }
    -    } ;
    -    
    +    public static GraphMaker graphMakerNull = () -> null ;
    +
    +    private static GraphMaker memGraphMaker = () -> 
GraphFactory.createDefaultGraph() ;
    +
    +    /**
    +     * @return a DatasetGraph which features transactional in-memory 
operation
    +     */
    +    public static DatasetGraph createTxMem() { return new 
DatasetGraphInMemory(); }
    +
    --- End diff --
    
    Changed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to