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

    https://github.com/apache/jena/pull/434#discussion_r194269450
  
    --- Diff: 
jena-db/jena-tdb2/src/main/java/org/apache/jena/tdb2/store/GraphViewSwitchable.java
 ---
    @@ -79,16 +83,34 @@ public TransactionHandler getTransactionHandler() {
         /** Return the {@code DatasetGraphSwitchable} we are viewing. */
         @Override
         public DatasetGraphSwitchable getDataset() {
    -        return getx() ;
    +        return getx();
         }
         
         /** Return the {@code Graph} from the underlying switchable.
          *  Do not hold onto this reference across switches. 
          */
         public Graph getGraph() {
    -        return getx().getGraph(getGraphName()) ;
    +        return getx().getGraph(getGraphName());
         }
     
    +    // Super uses find. Override to call GraphTDB.size()
    +    @Override
    +    protected int graphBaseSize() {
    +        if ( isDefaultGraph() )
    +            return getDSG().getDefaultGraphTDB().size();
    +        return getDSG().getGraphTDB(getGraphName()).size();
    +    }
    +
    +    private DatasetGraphTDB getDSG() {
    +        return ((DatasetGraphTDB)(getx().get()));    
    +    }
    +    
    +    private static Function<Tuple<NodeId>, Tuple<NodeId>> 
project4TupleTo3Tuple = item -> {
    --- End diff --
    
    This seems kind of out of place...


---

Reply via email to