jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1605034 [3/16] - in /jena/trunk: jena-arq/src/main/java/arq/ jena-arq/src/main/java/arq/cmdline/ jena-arq/src/main/java/com/hp/hpl/jena/query/ jena-arq/src/main/java/com/hp/hpl/jena/sparql/ jena-arq/src/main/java/com/hp/hpl/jena/sparql/alg...
Date Tue, 24 Jun 2014 09:07:06 GMT
Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/VarExprList.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/VarExprList.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/VarExprList.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/VarExprList.java Tue Jun 24 09:06:50 2014
@@ -20,7 +20,6 @@ package com.hp.hpl.jena.sparql.core;
 
 import java.util.ArrayList ;
 import java.util.HashMap ;
-import java.util.Iterator ;
 import java.util.List ;
 import java.util.Map ;
 
@@ -42,19 +41,19 @@ public class VarExprList
     public VarExprList(List<Var> vars)
     {
         this.vars = vars ;
-        this.exprs = new HashMap<Var, Expr>() ;
+        this.exprs = new HashMap<>() ;
     }
     
     public VarExprList(VarExprList other)
     {
-        this.vars = new ArrayList<Var>(other.vars) ; 
-        this.exprs = new HashMap<Var, Expr>(other.exprs) ;
+        this.vars = new ArrayList<>(other.vars) ;
+        this.exprs = new HashMap<>(other.exprs) ;
     }
 
     public VarExprList()
     {
-        this.vars = new ArrayList<Var>() ;
-        this.exprs = new HashMap<Var, Expr>() ;
+        this.vars = new ArrayList<>() ;
+        this.exprs = new HashMap<>() ;
     }
     
     public VarExprList(Var var, Expr expr)
@@ -119,11 +118,10 @@ public class VarExprList
     
     public void addAll(VarExprList other)
     {
-        for ( Iterator<Var> iter = other.vars.iterator() ; iter.hasNext() ; )
+        for ( Var v : other.vars )
         {
-            Var v = iter.next () ;
-            Expr e = other.getExpr(v) ;
-            add(v, e) ;
+            Expr e = other.getExpr( v );
+            add( v, e );
         }
     }
 

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssembler.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssembler.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssembler.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssembler.java Tue Jun 24 09:06:50 2014
@@ -18,7 +18,6 @@
 
 package com.hp.hpl.jena.sparql.core.assembler ;
 
-import java.util.Iterator ;
 import java.util.List ;
 
 import org.apache.jena.atlas.logging.Log ;
@@ -73,24 +72,31 @@ public class DatasetAssembler extends As
         // -------- Named graphs
         List<RDFNode> nodes = GraphUtils.multiValue(root, DatasetAssemblerVocab.pNamedGraph) ;
 
-        for (Iterator<RDFNode> iter = nodes.iterator(); iter.hasNext();) {
-            RDFNode n = iter.next() ;
-            if ( !(n instanceof Resource) )
-                throw new DatasetAssemblerException(root, "Not a resource: " + FmtUtils.stringForRDFNode(n)) ;
-            Resource r = (Resource)n ;
-
-            String gName = GraphUtils.getAsStringValue(r, DatasetAssemblerVocab.pGraphName) ;
-            Resource g = GraphUtils.getResourceValue(r, DatasetAssemblerVocab.pGraph) ;
-            if ( g == null ) {
-                g = GraphUtils.getResourceValue(r, DatasetAssemblerVocab.pGraphAlt) ;
+        for ( RDFNode n : nodes )
+        {
+            if ( !( n instanceof Resource ) )
+            {
+                throw new DatasetAssemblerException( root, "Not a resource: " + FmtUtils.stringForRDFNode( n ) );
+            }
+            Resource r = (Resource) n;
+
+            String gName = GraphUtils.getAsStringValue( r, DatasetAssemblerVocab.pGraphName );
+            Resource g = GraphUtils.getResourceValue( r, DatasetAssemblerVocab.pGraph );
+            if ( g == null )
+            {
+                g = GraphUtils.getResourceValue( r, DatasetAssemblerVocab.pGraphAlt );
                 if ( g != null )
-                    Log.warn(this, "Use of old vocabulary: use :graph not :graphData") ;
+                {
+                    Log.warn( this, "Use of old vocabulary: use :graph not :graphData" );
+                }
                 else
-                    throw new DatasetAssemblerException(root, "no graph for: " + gName) ;
+                {
+                    throw new DatasetAssemblerException( root, "no graph for: " + gName );
+                }
             }
 
-            Model m = a.openModel(g) ;
-            ds.addNamedModel(gName, m) ;
+            Model m = a.openModel( g );
+            ds.addNamedModel( gName, m );
         }
 
         AssemblerUtils.setContext(root, ds.getContext()) ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/describe/DescribeHandlerRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/describe/DescribeHandlerRegistry.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/describe/DescribeHandlerRegistry.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/describe/DescribeHandlerRegistry.java Tue Jun 24 09:06:50 2014
@@ -32,7 +32,7 @@ public class DescribeHandlerRegistry
 {
     static private DescribeHandlerRegistry globalRegistry = null ;
     
-    private List<DescribeHandlerFactory> registry = new ArrayList<DescribeHandlerFactory>() ; 
+    private List<DescribeHandlerFactory> registry = new ArrayList<>() ;
 
     private DescribeHandlerRegistry() { }
     
@@ -84,7 +84,7 @@ public class DescribeHandlerRegistry
     
     public List<DescribeHandler> newHandlerList()
     {
-        List<DescribeHandler> a = new ArrayList<DescribeHandler>(registry.size()) ;
+        List<DescribeHandler> a = new ArrayList<>(registry.size()) ;
         for ( Iterator<DescribeHandlerFactory> iter = handlers() ; iter.hasNext() ; )
         {
             DescribeHandlerFactory f = iter.next();

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ExecutionContext.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ExecutionContext.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ExecutionContext.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ExecutionContext.java Tue Jun 24 09:06:50 2014
@@ -64,9 +64,9 @@ public class ExecutionContext implements
     {
         this.context = params ;
         this.dataset = dataset ;
-        this.openIterators = new ArrayList<QueryIterator>() ;
+        this.openIterators = new ArrayList<>() ;
         if ( TrackAllIterators )
-            this.allIterators  = new ArrayList<QueryIterator>() ;
+            this.allIterators  = new ArrayList<>() ;
         this.activeGraph = activeGraph ;
         this.executor = factory ;
     }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/QueryEngineRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/QueryEngineRegistry.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/QueryEngineRegistry.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/QueryEngineRegistry.java Tue Jun 24 09:06:50 2014
@@ -19,7 +19,6 @@
 package com.hp.hpl.jena.sparql.engine;
 
 import java.util.ArrayList ;
-import java.util.Iterator ;
 import java.util.List ;
 
 import com.hp.hpl.jena.query.Query ;
@@ -31,7 +30,7 @@ import com.hp.hpl.jena.sparql.util.Conte
 
 public class QueryEngineRegistry
 {
-    List<QueryEngineFactory> factories = new ArrayList<QueryEngineFactory>() ;
+    List<QueryEngineFactory> factories = new ArrayList<>() ;
     static { init() ; }
     
     // Singleton
@@ -93,11 +92,12 @@ public class QueryEngineRegistry
     
     public QueryEngineFactory find(Query query, DatasetGraph dataset, Context context)
     {
-        for ( Iterator<QueryEngineFactory> iter = factories.listIterator() ; iter.hasNext() ; )
+        for ( QueryEngineFactory f : factories )
         {
-            QueryEngineFactory f = iter.next() ;
-            if ( f.accept(query, dataset, context) )
-                return f ;
+            if ( f.accept( query, dataset, context ) )
+            {
+                return f;
+            }
         }
         return null ;
     }
@@ -113,11 +113,12 @@ public class QueryEngineRegistry
     
     public QueryEngineFactory find(Op op, DatasetGraph dataset, Context context)
     {
-        for ( Iterator<QueryEngineFactory> iter = factories.listIterator() ; iter.hasNext() ; )
+        for ( QueryEngineFactory f : factories )
         {
-            QueryEngineFactory f = iter.next() ;
-            if ( f.accept(op, dataset, context) )
-                return f ;
+            if ( f.accept( op, dataset, context ) )
+            {
+                return f;
+            }
         }
         return null ;
     }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/QueryExecutionBase.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/QueryExecutionBase.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/QueryExecutionBase.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/QueryExecutionBase.java Tue Jun 24 09:06:50 2014
@@ -245,7 +245,7 @@ public class QueryExecutionBase implemen
         if ( query.getQueryPattern() == null )
             query.setQueryPattern(new ElementGroup()) ;
         
-        Set<RDFNode> set = new HashSet<RDFNode>() ;
+        Set<RDFNode> set = new HashSet<>() ;
 
         //May return null (no query pattern) 
         ResultSet qRes = execResultSet() ;
@@ -285,18 +285,20 @@ public class QueryExecutionBase implemen
             dh.start(model, getContext()) ;
 
         // Do describe for each resource found.
-        for (Iterator<RDFNode> iter = set.iterator() ; iter.hasNext() ;)
+        for ( RDFNode n : set )
         {
-            RDFNode n = iter.next() ;
-
             if ( n instanceof Resource )
             {
-                for (DescribeHandler dh : dhList)
-                    dh.describe((Resource)n) ;
+                for ( DescribeHandler dh : dhList )
+                {
+                    dh.describe( (Resource) n );
+                }
             }
             else
-                // Can't describe literals
-                continue ;
+            // Can't describe literals
+            {
+                continue;
+            }
         }
 
         for (DescribeHandler dh : dhList)

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/Rename.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/Rename.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/Rename.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/Rename.java Tue Jun 24 09:06:50 2014
@@ -118,7 +118,7 @@ public class Rename
     
     static class RenameAnyVars implements NodeTransform
     {
-        private final Map<Var, Var> aliases = new HashMap<Var, Var>() ;
+        private final Map<Var, Var> aliases = new HashMap<>() ;
         private final Collection<Var> constants ;
         private final String varPrefix ;
         

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/TableJoin.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/TableJoin.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/TableJoin.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/TableJoin.java Tue Jun 24 09:06:50 2014
@@ -69,7 +69,7 @@ public class TableJoin
     private static QueryIterator joinWorkerN(QueryIterator left, Table right, JoinType joinType, ExprList conditions, ExecutionContext execCxt) {       
         // We could hash the right except we don't know much about columns.
         
-        List<Binding> out = new ArrayList<Binding>() ;
+        List<Binding> out = new ArrayList<>() ;
         for ( ; left.hasNext() ; ) {
             Binding bindingLeft = left.next() ;
             int count = 0 ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingComparator.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingComparator.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingComparator.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingComparator.java Tue Jun 24 09:06:50 2014
@@ -76,30 +76,47 @@ public class BindingComparator implement
     @Override
     public int compare(Binding bind1, Binding bind2)
     {
-        for ( Iterator<SortCondition> iter = conditions.iterator() ; iter.hasNext() ; )
+        for ( SortCondition sc : conditions )
         {
-            SortCondition sc = iter.next() ;
             if ( sc.expression == null )
-                throw new QueryExecException("Broken sort condition") ;
+            {
+                throw new QueryExecException( "Broken sort condition" );
+            }
 
-            NodeValue nv1 = null ;
-            NodeValue nv2 = null ;
-            
-            try { nv1 = sc.expression.eval(bind1, env) ; }
-            catch (VariableNotBoundException ex) {}
-            catch (ExprEvalException ex)
-            { Log.warn(this, ex.getMessage()) ; }
-            
-            try { nv2 = sc.expression.eval(bind2, env) ; }
-            catch (VariableNotBoundException ex) {}
-            catch (ExprEvalException ex)
-            { Log.warn(this, ex.getMessage()) ; }
-            
-            Node n1 = NodeValue.toNode(nv1) ;
-            Node n2 = NodeValue.toNode(nv2) ;
-            int x = compareNodes(nv1, nv2, sc.direction) ;
+            NodeValue nv1 = null;
+            NodeValue nv2 = null;
+
+            try
+            {
+                nv1 = sc.expression.eval( bind1, env );
+            }
+            catch ( VariableNotBoundException ex )
+            {
+            }
+            catch ( ExprEvalException ex )
+            {
+                Log.warn( this, ex.getMessage() );
+            }
+
+            try
+            {
+                nv2 = sc.expression.eval( bind2, env );
+            }
+            catch ( VariableNotBoundException ex )
+            {
+            }
+            catch ( ExprEvalException ex )
+            {
+                Log.warn( this, ex.getMessage() );
+            }
+
+            Node n1 = NodeValue.toNode( nv1 );
+            Node n2 = NodeValue.toNode( nv2 );
+            int x = compareNodes( nv1, nv2, sc.direction );
             if ( x != Expr.CMP_EQUAL )
-                return x ;
+            {
+                return x;
+            }
         }
         // Same by the SortConditions - now do any extra tests to make sure they are unique.
         return compareBindingsSyntactic(bind1, bind2) ;
@@ -134,7 +151,7 @@ public class BindingComparator implement
         
         // The variables in bindings are unordered.  If we want a good comparison, we need an order.
         // We'll choose lexicographically by name.  Unfortunately this means a sort on every comparison.
-        List<Var> varList = new ArrayList<Var>();
+        List<Var> varList = new ArrayList<>();
         for (Iterator<Var> iter = bind1.vars(); iter.hasNext(); )
         {
             varList.add(iter.next());

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingHashMap.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingHashMap.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingHashMap.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingHashMap.java Tue Jun 24 09:06:50 2014
@@ -37,7 +37,7 @@ import com.hp.hpl.jena.sparql.util.FmtUt
 public class BindingHashMap extends BindingBase implements BindingMap
 {
     // Bindings are often small.  Is this overkill? 
-    Map<Var, Node> map = new HashMap<Var, Node>() ;
+    Map<Var, Node> map = new HashMap<>() ;
     
     /** Using BindingFactory.create is better */
     public BindingHashMap(Binding parent) { super(parent) ; }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingInputStream.java Tue Jun 24 09:06:50 2014
@@ -125,7 +125,7 @@ public class BindingInputStream extends 
     class IteratorTuples extends IteratorSlotted<Binding>
     {
         private Binding lastLine ;
-        List<Var> vars = new ArrayList<Var>() ;
+        List<Var> vars = new ArrayList<>() ;
 
         // Process any directive immediately.
         public IteratorTuples()

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingProjectBase.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingProjectBase.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingProjectBase.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/binding/BindingProjectBase.java Tue Jun 24 09:06:50 2014
@@ -59,7 +59,7 @@ public abstract class BindingProjectBase
 
     private List<Var> actualVars() {
         if ( actualVars == null ) {
-            actualVars = new ArrayList<Var>() ;
+            actualVars = new ArrayList<>() ;
             Iterator<Var> iter = binding.vars() ;
             for ( ; iter.hasNext() ; ) {
                 Var v = iter.next() ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/HttpContentType.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/HttpContentType.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/HttpContentType.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/HttpContentType.java Tue Jun 24 09:06:50 2014
@@ -69,7 +69,7 @@ public class HttpContentType
     @Override
     public String toString()
     {
-        StringBuffer sbuff = new StringBuffer() ;
+        StringBuilder sbuff = new StringBuilder() ;
         if ( mediaType != null )
             sbuff.append(mediaType) ;
         if ( charset != null )

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Params.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Params.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Params.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Params.java Tue Jun 24 09:06:50 2014
@@ -31,10 +31,10 @@ import com.hp.hpl.jena.sparql.util.Conve
 public class Params
 {
     // As seen.
-    private List<Pair> paramList = new ArrayList<Pair>() ;
+    private List<Pair> paramList = new ArrayList<>() ;
     
     // string -> list -> string
-    private Map<String, List<String>> params = new HashMap<String, List<String>>() ;
+    private Map<String, List<String>> params = new HashMap<>() ;
     
     
     /** Create a Params object */
@@ -71,7 +71,7 @@ public class Params
         List<String> x = params.get(name) ;
         if ( x == null )
         {
-            x = new ArrayList<String>() ;
+            x = new ArrayList<>() ;
             params.put(name, x) ;
         }
         x.add(value) ;
@@ -121,7 +121,7 @@ public class Params
     /** Get the names of parameters - one ocurrence */ 
     public List<String> names()
     {
-        List<String> names = new ArrayList<String>() ;
+        List<String> names = new ArrayList<>() ;
         for (Pair pair : paramList)
         {
             String s = pair.getName() ;
@@ -134,7 +134,7 @@ public class Params
     
     public String httpString()
     {
-        StringBuffer sbuff = new StringBuffer() ; 
+        StringBuilder sbuff = new StringBuilder() ;
         boolean first = true ;
         for (Pair p : pairs())
         {

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java Tue Jun 24 09:06:50 2014
@@ -64,8 +64,8 @@ public class QueryEngineHTTP implements 
     private Params params = null;
 
     // Protocol
-    private List<String> defaultGraphURIs = new ArrayList<String>();
-    private List<String> namedGraphURIs = new ArrayList<String>();
+    private List<String> defaultGraphURIs = new ArrayList<>();
+    private List<String> namedGraphURIs = new ArrayList<>();
     private HttpAuthenticator authenticator;
 
     private boolean finished = false;
@@ -276,7 +276,7 @@ public class QueryEngineHTTP implements 
      */
     public void addDefaultGraph(String defaultGraph) {
         if (defaultGraphURIs == null)
-            defaultGraphURIs = new ArrayList<String>();
+            defaultGraphURIs = new ArrayList<>();
         defaultGraphURIs.add(defaultGraph);
     }
 
@@ -286,7 +286,7 @@ public class QueryEngineHTTP implements 
      */
     public void addNamedGraph(String name) {
         if (namedGraphURIs == null)
-            namedGraphURIs = new ArrayList<String>();
+            namedGraphURIs = new ArrayList<>();
         namedGraphURIs.add(name);
     }
 
@@ -577,13 +577,13 @@ public class QueryEngineHTTP implements 
         httpQuery.merge(getServiceParams(service, context));
         httpQuery.addParam(HttpParams.pQuery, queryString);
 
-        for (Iterator<String> iter = defaultGraphURIs.iterator(); iter.hasNext();) {
-            String dft = iter.next();
-            httpQuery.addParam(HttpParams.pDefaultGraph, dft);
-        }
-        for (Iterator<String> iter = namedGraphURIs.iterator(); iter.hasNext();) {
-            String name = iter.next();
-            httpQuery.addParam(HttpParams.pNamedGraph, name);
+        for ( String dft : defaultGraphURIs )
+        {
+            httpQuery.addParam( HttpParams.pDefaultGraph, dft );
+        }
+        for ( String name : namedGraphURIs )
+        {
+            httpQuery.addParam( HttpParams.pNamedGraph, name );
         }
 
         if (params != null)

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryExceptionHTTP.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryExceptionHTTP.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryExceptionHTTP.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryExceptionHTTP.java Tue Jun 24 09:06:50 2014
@@ -95,7 +95,7 @@ public class QueryExceptionHTTP extends 
     @Override
     public String toString()
     {
-        StringBuffer sb = new StringBuffer() ;
+        StringBuilder sb = new StringBuilder() ;
         sb.append("HttpException: ") ;
         int code = getResponseCode() ;
         if ( code != QueryExceptionHTTP.noResponseCode )

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/Service.java Tue Jun 24 09:06:50 2014
@@ -124,7 +124,7 @@ public class Service {
         // operator to those visible in the rewritten operator
         // There may be some cases where the re-mapping is incorrect due to
         // deeply nested SERVICE clauses
-        Map<Var, Var> varMapping = new HashMap<Var, Var>();
+        Map<Var, Var> varMapping = new HashMap<>();
         Set<Var> originalVars = OpVars.visibleVars(op);
         Set<Var> remoteVars = OpVars.visibleVars(opRemote);
 

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/HashIndexTable.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/HashIndexTable.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/HashIndexTable.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/HashIndexTable.java Tue Jun 24 09:06:50 2014
@@ -50,7 +50,7 @@ public class HashIndexTable implements I
     		return ;
     	}
 
-    	table = new HashSet<Key>() ;
+    	table = new HashSet<>() ;
     	missingValue = false ;
 
     	while ( data.hasNext() )
@@ -91,7 +91,7 @@ public class HashIndexTable implements I
 
     private void initColumnMappings(Set<Var> commonVars)
     {
-    	varColumns = new HashMap<Var,Integer>() ;
+    	varColumns = new HashMap<>() ;
     	int c = 0 ;
     	for ( Var var: commonVars )
     		varColumns.put(var, c++) ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/LinearIndex.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/LinearIndex.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/LinearIndex.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/LinearIndex.java Tue Jun 24 09:06:50 2014
@@ -51,7 +51,7 @@ import com.hp.hpl.jena.sparql.engine.bin
 public class LinearIndex implements IndexTable {
 
 	final Set<Var> commonVars ;
-	List<Binding> table = new ArrayList<Binding>() ;
+	List<Binding> table = new ArrayList<>() ;
 
 	public LinearIndex(Set<Var> commonVars, QueryIterator data)
 	{

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/SetIndexTable.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/SetIndexTable.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/SetIndexTable.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/index/SetIndexTable.java Tue Jun 24 09:06:50 2014
@@ -34,7 +34,7 @@ import com.hp.hpl.jena.sparql.engine.bin
 public class SetIndexTable implements IndexTable {
 
     private Var var;
-    private Set<Node> values = new HashSet<Node>();
+    private Set<Node> values = new HashSet<>();
 
     /**
      * Creates a new index table

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterConcat.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterConcat.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterConcat.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterConcat.java Tue Jun 24 09:06:50 2014
@@ -38,7 +38,7 @@ import com.hp.hpl.jena.sparql.util.Utils
 public class QueryIterConcat extends QueryIter
 {
     boolean initialized = false ;
-    List<QueryIterator> iteratorList = new ArrayList<QueryIterator>() ; 
+    List<QueryIterator> iteratorList = new ArrayList<>() ;
     Iterator<QueryIterator> iterator ;
     QueryIterator currentQIter = null ;
 
@@ -114,20 +114,18 @@ public class QueryIterConcat extends Que
     @Override
     protected void closeIterator()
     {
-        for ( Iterator<QueryIterator> iter = iteratorList.iterator() ; iter.hasNext() ; )
+        for ( QueryIterator qIter : iteratorList )
         {
-            QueryIterator qIter = iter.next() ;
-            performClose(qIter) ;
+            performClose( qIter );
         }
     }
     
     @Override
     protected void requestCancel()
     {
-        for ( Iterator<QueryIterator> iter = iteratorList.iterator() ; iter.hasNext() ; )
+        for ( QueryIterator qIter : iteratorList )
         {
-            QueryIterator qIter = iter.next() ;
-            performRequestCancel(qIter) ;
+            performRequestCancel( qIter );
         }
     }
     
@@ -136,10 +134,9 @@ public class QueryIterConcat extends Que
     { 
         out.println(Utils.className(this)) ;
         out.incIndent() ;
-        for ( Iterator<QueryIterator> iter = iteratorList.iterator() ; iter.hasNext() ; )
+        for ( QueryIterator qIter : iteratorList )
         {
-            QueryIterator qIter = iter.next() ;
-            qIter.output(out, sCxt) ;
+            qIter.output( out, sCxt );
         }
         out.decIndent() ;
         out.ensureStartOfLine() ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterDistinctMem.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterDistinctMem.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterDistinctMem.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterDistinctMem.java Tue Jun 24 09:06:50 2014
@@ -28,7 +28,7 @@ import com.hp.hpl.jena.sparql.engine.bin
 /** Memory limited QueryIterDistinct */
 public class QueryIterDistinctMem extends QueryIterDistinctReduced
 {
-    private Set<Binding> seen = new HashSet<Binding>() ;
+    private Set<Binding> seen = new HashSet<>() ;
     
     public QueryIterDistinctMem(QueryIterator iter, ExecutionContext context)
     {

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterGroup.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterGroup.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterGroup.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterGroup.java Tue Jun 24 09:06:50 2014
@@ -131,13 +131,14 @@ public class QueryIterGroup extends Quer
                     
                     BindingMap binding = BindingFactory.create() ;
 
-                    for ( Iterator<ExprAggregator> aggIter = aggregators.iterator() ; aggIter.hasNext() ; )
+                    for ( ExprAggregator agg : aggregators )
                     {
-                        ExprAggregator agg = aggIter.next();
-                        Var v = agg.getVar() ;
-                        Node value = agg.getAggregator().getValueEmpty() ;
+                        Var v = agg.getVar();
+                        Node value = agg.getAggregator().getValueEmpty();
                         if ( value != null )
-                            binding.add(v, value) ;
+                        {
+                            binding.add( v, value );
+                        }
                     }
                         
                     if ( binding == null )
@@ -155,7 +156,7 @@ public class QueryIterGroup extends Quer
                     // We used placeholder so there are always the key. 
                     return accumulators.keys().iterator() ;
                 
-                List<Binding> results = new ArrayList<Binding>() ;
+                List<Binding> results = new ArrayList<>() ;
 
                 for ( Binding k : accumulators.keys() )
                 {
@@ -189,13 +190,14 @@ public class QueryIterGroup extends Quer
         // No group vars (implicit or explicit) => working on whole result set. 
         // Still need a BindingMap to assign to later.
         BindingMap x = BindingFactory.create() ;
-        for ( Iterator<Var> iter = vars.getVars().iterator() ; iter.hasNext() ; )
+        for ( Var var : vars.getVars() )
         {
-            Var var = iter.next() ;
-            Node node = vars.get(var, binding, execCxt) ;
+            Node node = vars.get( var, binding, execCxt );
             // Null returned for unbound and error.
             if ( node != null )
-                x.add(var, node) ;
+            {
+                x.add( var, node );
+            }
         }
         return x ;
     }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterReduced.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterReduced.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterReduced.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIterReduced.java Tue Jun 24 09:06:50 2014
@@ -27,7 +27,7 @@ import com.hp.hpl.jena.sparql.engine.bin
 
 public class QueryIterReduced extends QueryIterDistinctReduced
 {
-    List<Binding> window = new ArrayList<Binding>() ;
+    List<Binding> window = new ArrayList<>() ;
     int N = 1 ;
     
     public QueryIterReduced(QueryIterator iter, ExecutionContext context)

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIteratorCaching.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIteratorCaching.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIteratorCaching.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIteratorCaching.java Tue Jun 24 09:06:50 2014
@@ -35,7 +35,7 @@ public 
 class QueryIteratorCaching extends QueryIteratorWrapper
 {
     // Not tracked.
-    List<Binding> cache = new ArrayList<Binding>() ;
+    List<Binding> cache = new ArrayList<>() ;
     
     public QueryIteratorCaching(QueryIterator qIter)
     {
@@ -60,7 +60,7 @@ class QueryIteratorCaching extends Query
         List<Binding> elements = cache ;
         if ( super.hasNext() )
             // If the iterator isn't finished, copy what we have so far.
-            elements = new ArrayList<Binding>(cache) ;
+            elements = new ArrayList<>(cache) ;
         
         return new QueryIteratorCaching(new QueryIterPlainWrapper(elements.iterator(), null)) ;
     }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIteratorCopy.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIteratorCopy.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIteratorCopy.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIteratorCopy.java Tue Jun 24 09:06:50 2014
@@ -35,7 +35,7 @@ import com.hp.hpl.jena.sparql.serializer
 class QueryIteratorCopy extends QueryIteratorBase
 {
     // Not tracked.
-    List<Binding> elements = new ArrayList<Binding>() ;
+    List<Binding> elements = new ArrayList<>() ;
     QueryIterator iterator ;
     
     QueryIterator original ;        // Keep for debugging - This is closed as it is copied.

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/ExecutionDispatch.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/ExecutionDispatch.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/ExecutionDispatch.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/ExecutionDispatch.java Tue Jun 24 09:06:50 2014
@@ -32,7 +32,7 @@ import com.hp.hpl.jena.sparql.engine.Que
 
 class ExecutionDispatch implements OpVisitor
 {
-    private Deque<QueryIterator> stack = new ArrayDeque<QueryIterator>() ;
+    private Deque<QueryIterator> stack = new ArrayDeque<>() ;
     private OpExecutor opExecutor ;
     
     ExecutionDispatch(OpExecutor exec)

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/LeftJoinClassifier.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/LeftJoinClassifier.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/LeftJoinClassifier.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/LeftJoinClassifier.java Tue Jun 24 09:06:50 2014
@@ -93,7 +93,7 @@ public class LeftJoinClassifier
         // Case 3
         // A variable mentioned in the assign is not introduced on the RHS
         // Cannot linearize as would change bind evaluation
-        Set<Var> unsafeAssign = new HashSet<Var>(assignVarsRight);
+        Set<Var> unsafeAssign = new HashSet<>(assignVarsRight);
         unsafeAssign.removeAll(fixedRight);
         boolean b3 = unsafeAssign.size() > 0 ;
         if (print) System.err.println("Case 3 - " + b3);

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/OpExecutor.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/OpExecutor.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/OpExecutor.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/OpExecutor.java Tue Jun 24 09:06:50 2014
@@ -284,7 +284,7 @@ public class OpExecutor
 
     // Based on code from Olaf Hartig.
     protected List<Op> flattenUnion(OpUnion opUnion) {
-        List<Op> x = new ArrayList<Op>() ;
+        List<Op> x = new ArrayList<>() ;
         flattenUnion(x, opUnion) ;
         return x ;
     }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/VarFinder.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/VarFinder.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/VarFinder.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/VarFinder.java Tue Jun 24 09:06:50 2014
@@ -94,10 +94,10 @@ public class VarFinder
 
         VarUsageVisitor()
         {
-            defines = new HashSet<Var>() ;   
-            optDefines = new HashSet<Var>() ;
-            filterMentions = new HashSet<Var>() ;
-            assignMentions = new HashSet<Var>() ;
+            defines = new HashSet<>() ;
+            optDefines = new HashSet<>() ;
+            filterMentions = new HashSet<>() ;
+            assignMentions = new HashSet<>() ;
         }
         
         VarUsageVisitor(Set<Var> _defines, Set<Var> _optDefines, Set<Var> _filterMentions, Set<Var> _assignMentions)

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterGraph.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterGraph.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterGraph.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/main/iterator/QueryIterGraph.java Tue Jun 24 09:06:50 2014
@@ -91,7 +91,7 @@ public class QueryIterGraph extends Quer
         if ( n2 == null )
             // Do all submodels.
             return data.listGraphNodes() ;
-        return new SingletonIterator<Node>(n2) ;
+        return new SingletonIterator<>(n2) ;
     }
     
 

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/StatsMatcher.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/StatsMatcher.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/StatsMatcher.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/StatsMatcher.java Tue Jun 24 09:06:50 2014
@@ -73,9 +73,9 @@ public final class StatsMatcher
     }
 
     // General structure
-    protected List<Pattern> patterns = new ArrayList<Pattern>() ;
+    protected List<Pattern> patterns = new ArrayList<>() ;
     // Map keyed by P for faster lookup (if no P available, we'll use the full list).  
-    protected Map<Item, List<Pattern>> mapPatterns = new HashMap<Item,  List<Pattern>>() ;
+    protected Map<Item, List<Pattern>> mapPatterns = new HashMap<>() ;
     
     // Default behaviour
     double DefaultMatch = NOMATCH ;
@@ -264,7 +264,7 @@ public final class StatsMatcher
         List<Pattern> entry = mapPatterns.get(pattern.predItem) ;
         if ( entry == null )
         {
-            entry = new ArrayList<Pattern>() ;
+            entry = new ArrayList<>() ;
             mapPatterns.put(pattern.predItem, entry ) ;
         }
         entry.add(pattern) ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/reorder/ReorderProcIndexes.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/reorder/ReorderProcIndexes.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/reorder/ReorderProcIndexes.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/reorder/ReorderProcIndexes.java Tue Jun 24 09:06:50 2014
@@ -46,12 +46,11 @@ public class ReorderProcIndexes implemen
             throw new ARQException(str) ; 
         }        
         
-        BasicPattern bgp2 = new BasicPattern() ; 
-        for ( int j = 0 ; j < indexes.length ; j++ )
+        BasicPattern bgp2 = new BasicPattern() ;
+        for ( int idx : indexes )
         {
-            int idx = indexes[j] ;
-            Triple t = bgp.get(idx) ;
-            bgp2.add(t) ;
+            Triple t = bgp.get( idx );
+            bgp2.add( t );
         }
         return bgp2 ;
     }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/reorder/ReorderTransformationSubstitution.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/reorder/ReorderTransformationSubstitution.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/reorder/ReorderTransformationSubstitution.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/optimizer/reorder/ReorderTransformationSubstitution.java Tue Jun 24 09:06:50 2014
@@ -158,7 +158,7 @@ public abstract class ReorderTransformat
     /** Return all the indexes of pattern triples of the least weight. */
     protected List<Integer> chooseAll(List<PatternTriple> pTriples)
     {
-        List<Integer> results = new ArrayList<Integer>(pTriples.size()) ;
+        List<Integer> results = new ArrayList<>(pTriples.size()) ;
         processPTriples(pTriples, results) ;
         return results ;
     }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/Eval.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/Eval.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/Eval.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/Eval.java Tue Jun 24 09:06:50 2014
@@ -77,7 +77,7 @@ public class Eval
 
         DatasetGraph dsg = evaluator.getExecContext().getDataset() ;
         Iterator<Node> iter = dsg.listGraphNodes() ;
-        List<Binding> list = new ArrayList<Binding>((int)dsg.size()) ;
+        List<Binding> list = new ArrayList<>((int)dsg.size()) ;
         for ( ; iter.hasNext(); )
         {
             Node gn = iter.next();

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/EvaluatorDispatch.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/EvaluatorDispatch.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/EvaluatorDispatch.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/EvaluatorDispatch.java Tue Jun 24 09:06:50 2014
@@ -38,7 +38,7 @@ import com.hp.hpl.jena.sparql.engine.htt
 
 public class EvaluatorDispatch implements OpVisitor
 {
-    private Deque<Table> stack = new ArrayDeque<Table>() ;
+    private Deque<Table> stack = new ArrayDeque<>() ;
     protected Evaluator evaluator ;
     
     public EvaluatorDispatch(Evaluator evaluator)

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/EvaluatorSimple.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/EvaluatorSimple.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/EvaluatorSimple.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/ref/EvaluatorSimple.java Tue Jun 24 09:06:50 2014
@@ -156,7 +156,7 @@ public class EvaluatorSimple implements 
             dump(table) ;
         }
         QueryIterator iter = table.iterator(execCxt) ;
-        List<Binding> output = new ArrayList<Binding>() ;
+        List<Binding> output = new ArrayList<>() ;
         for ( ; iter.hasNext() ; )
         {
             Binding b = iter.nextBinding() ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_BNode.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_BNode.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_BNode.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_BNode.java Tue Jun 24 09:06:50 2014
@@ -70,7 +70,7 @@ public class E_BNode extends ExprFunctio
 
         if ( mapping == null )
         {
-            mapping = new IdentityHashMap<Binding, LabelToNodeMap>() ;
+            mapping = new IdentityHashMap<>() ;
             env.getContext().set(keyMap, mapping) ;
         }        
         LabelToNodeMap mapper = mapping.get(binding) ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Call.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Call.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Call.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/E_Call.java Tue Jun 24 09:06:50 2014
@@ -34,7 +34,7 @@ import com.hp.hpl.jena.sparql.util.Conte
 public class E_Call extends ExprFunctionN
 {
     private static final String symbol = Tags.tagCall ;
-    private Map<String,Expr> functionCache = new HashMap<String, Expr>();
+    private Map<String,Expr> functionCache = new HashMap<>();
     private Expr identExpr;
     private List<Expr> argExprs;
 

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprFunction.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprFunction.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprFunction.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprFunction.java Tue Jun 24 09:06:50 2014
@@ -57,7 +57,7 @@ public abstract class ExprFunction exten
     {
         if ( argList != null )
             return argList ; 
-        argList = new ArrayList<Expr>() ;
+        argList = new ArrayList<>() ;
         for ( int i = 1 ; i <= numArgs() ; i++ )
             argList.add(this.getArg(i)) ;
         return argList ;        

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprFunctionN.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprFunctionN.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprFunctionN.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprFunctionN.java Tue Jun 24 09:06:50 2014
@@ -103,7 +103,7 @@ public abstract class ExprFunctionN exte
         if ( s != null )
             return s ;
         
-        List<NodeValue> argsEval = new ArrayList<NodeValue>() ; 
+        List<NodeValue> argsEval = new ArrayList<>() ;
         for ( int i = 1 ; i <= numArgs() ; i++ )
         {
             NodeValue x = eval(binding, env, getArg(i)) ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprTransformSubstitute.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprTransformSubstitute.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprTransformSubstitute.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprTransformSubstitute.java Tue Jun 24 09:06:50 2014
@@ -31,7 +31,7 @@ import com.hp.hpl.jena.sparql.function.u
  */
 public class ExprTransformSubstitute extends ExprTransformCopy {
     
-    private Map<String, Expr> replacements = new HashMap<String, Expr>();
+    private Map<String, Expr> replacements = new HashMap<>();
     
     /**
      * Creates a simple transform that replaces any occurrence of the given variable with the given expression

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprTransformer.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprTransformer.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprTransformer.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprTransformer.java Tue Jun 24 09:06:50 2014
@@ -68,7 +68,7 @@ public class ExprTransformer
     class ApplyExprTransformVisitor implements ExprVisitor
     {
         private ExprTransform transform ;
-        private final Deque<Expr> stack = new ArrayDeque<Expr>() ;
+        private final Deque<Expr> stack = new ArrayDeque<>() ;
         
         final Expr result()
         { 
@@ -131,12 +131,12 @@ public class ExprTransformer
         private ExprList process(List<Expr> exprList)
         {
             int N = exprList.size() ;
-            List<Expr> x = new ArrayList<Expr>(N) ;
-            for ( int i = 0 ; i < N ; i++ )
+            List<Expr> x = new ArrayList<>(N) ;
+            for ( Expr anExprList : exprList )
             {
-                Expr e2 = pop(stack) ;
+                Expr e2 = pop( stack );
                 // Add in reverse.
-                x.add(0, e2) ;
+                x.add( 0, e2 );
             }
             return new ExprList(x) ;
         }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprVars.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprVars.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprVars.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/ExprVars.java Tue Jun 24 09:06:50 2014
@@ -32,14 +32,14 @@ public class ExprVars
 
     public static Set<Var> getVarsMentioned(Expr expr)
     {
-        Set<Var> acc = new HashSet<Var>() ;
+        Set<Var> acc = new HashSet<>() ;
         varsMentioned(acc, expr) ;
         return acc ;
     }
 
     public static Set<Var> getVarsMentioned(ExprList exprs)
     {
-        Set<Var> acc = new HashSet<Var>() ;
+        Set<Var> acc = new HashSet<>() ;
         for ( Expr expr : exprs )
             varsMentioned(acc, expr) ;    
         return acc ;
@@ -55,13 +55,13 @@ public class ExprVars
                     acc.add(var) ;
                 }
             } ;
-        ExprVarsWorker<Var> vv = new ExprVarsWorker<Var>(acc, action) ;
+        ExprVarsWorker<Var> vv = new ExprVarsWorker<>(acc, action) ;
         ExprWalker.walk(vv, expr) ;
     }
     
     public static Set<String> getVarNamesMentioned(Expr expr)
     {
-        Set<String> acc = new HashSet<String>() ;
+        Set<String> acc = new HashSet<>() ;
         varNamesMentioned(acc, expr) ;
         return acc ;
     }
@@ -76,19 +76,19 @@ public class ExprVars
                     acc.add(var.getVarName()) ;
                 }
             } ;
-        ExprVarsWorker<String> vv = new ExprVarsWorker<String>(acc, action) ;
+        ExprVarsWorker<String> vv = new ExprVarsWorker<>(acc, action) ;
         ExprWalker.walk(vv, expr) ;
     }
     
     
     public static Set<Var> getVarsMentioned(SortCondition sortCondition) {
-        Set<Var> acc = new HashSet<Var>() ;
+        Set<Var> acc = new HashSet<>() ;
         varsMentioned(acc, sortCondition) ;
         return acc ;
     }
     
     public static Set<Var> getVarsMentioned(Collection<SortCondition> sortConditions) {
-        Set<Var> acc = new HashSet<Var>() ;
+        Set<Var> acc = new HashSet<>() ;
         varsMentioned(acc, sortConditions) ;
         return acc ;
     }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/NodeValue.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/NodeValue.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/NodeValue.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/NodeValue.java Tue Jun 24 09:06:50 2014
@@ -1142,7 +1142,7 @@ public abstract class NodeValue extends 
             
             if ( datatype.equals(XSDboolean) && XSDboolean.isValidLiteral(lit) )
             {
-                boolean b = ((Boolean)lit.getValue()).booleanValue() ;
+                boolean b = (Boolean) lit.getValue();
                 return new NodeValueBoolean(b, node) ;
             }
             

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AccumulatorDistinctAll.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AccumulatorDistinctAll.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AccumulatorDistinctAll.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AccumulatorDistinctAll.java Tue Jun 24 09:06:50 2014
@@ -28,7 +28,7 @@ import com.hp.hpl.jena.sparql.function.F
 abstract class AccumulatorDistinctAll implements Accumulator
 {
     // COUNT(DISTINCT *)
-    private final Set<Binding> rows = new HashSet<Binding>() ;
+    private final Set<Binding> rows = new HashSet<>() ;
     
     @Override
     final public void accumulate(Binding binding, FunctionEnv functionEnv)

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AccumulatorDistinctExpr.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AccumulatorDistinctExpr.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AccumulatorDistinctExpr.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AccumulatorDistinctExpr.java Tue Jun 24 09:06:50 2014
@@ -31,7 +31,7 @@ import com.hp.hpl.jena.sparql.function.F
 abstract class AccumulatorDistinctExpr implements Accumulator
 {
     // Better?? record a large hash. 
-    private final Set<NodeValue> values = new HashSet<NodeValue>() ;
+    private final Set<NodeValue> values = new HashSet<>() ;
     private long errorCount = 0 ; 
     private long count = 0 ;
     private final Expr expr ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggregatorBase.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggregatorBase.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggregatorBase.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggregatorBase.java Tue Jun 24 09:06:50 2014
@@ -45,7 +45,7 @@ public abstract class AggregatorBase imp
     
     protected AggregatorBase() {}
     
-    private Map<Binding, Accumulator> buckets = new HashMap<Binding, Accumulator>() ;   // Bindingkey => Accumulator
+    private Map<Binding, Accumulator> buckets = new HashMap<>() ;   // Bindingkey => Accumulator
 
     @Override
     public abstract Accumulator createAccumulator() ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/nodevalue/XSDFuncOp.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/nodevalue/XSDFuncOp.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/nodevalue/XSDFuncOp.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/nodevalue/XSDFuncOp.java Tue Jun 24 09:06:50 2014
@@ -696,7 +696,7 @@ public class XSDFuncOp
         throw new ARQInternalErrorException("Numeric op unrecognized (" + fName + "): " + nv) ;
     }
 
-    private static Set<XSDDatatype> integerSubTypes = new HashSet<XSDDatatype>() ;
+    private static Set<XSDDatatype> integerSubTypes = new HashSet<>() ;
     static { 
 //        decimalSubTypes.add(XSDDatatype.XSDfloat) ;
 //        decimalSubTypes.add(XSDDatatype.XSDdouble) ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/FunctionBase.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/FunctionBase.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/FunctionBase.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/FunctionBase.java Tue Jun 24 09:06:50 2014
@@ -19,7 +19,6 @@
 package com.hp.hpl.jena.sparql.function;
 
 import java.util.ArrayList ;
-import java.util.Iterator ;
 import java.util.List ;
 
 import com.hp.hpl.jena.sparql.ARQInternalErrorException ;
@@ -57,12 +56,11 @@ public abstract class FunctionBase imple
             // The contract on the function interface is that this should not happen.
             throw new ARQInternalErrorException("FunctionBase: Null args list") ;
         
-        List<NodeValue> evalArgs = new ArrayList<NodeValue>() ;
-        for ( Iterator<Expr> iter = args.iterator() ; iter.hasNext() ; )
+        List<NodeValue> evalArgs = new ArrayList<>() ;
+        for ( Expr e : args )
         {
-            Expr e = iter.next() ;
-            NodeValue x = e.eval(binding, env) ;
-            evalArgs.add(x) ;
+            NodeValue x = e.eval( binding, env );
+            evalArgs.add( x );
         }
         
         NodeValue nv =  exec(evalArgs) ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/FunctionRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/FunctionRegistry.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/FunctionRegistry.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/FunctionRegistry.java Tue Jun 24 09:06:50 2014
@@ -34,8 +34,8 @@ import com.hp.hpl.jena.sparql.util.Mappe
 public class FunctionRegistry //extends HashMap<String, Function>
 {
     // Extract a Registry class and do casting and initialization here.
-    Map<String, FunctionFactory> registry = new HashMap<String, FunctionFactory>() ;
-    Set<String> attemptedLoads = new HashSet<String>() ;
+    Map<String, FunctionFactory> registry = new HashMap<>() ;
+    Set<String> attemptedLoads = new HashSet<>() ;
     
     public synchronized static FunctionRegistry standardRegistry()
     {

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/library/strjoin.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/library/strjoin.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/library/strjoin.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/library/strjoin.java Tue Jun 24 09:06:50 2014
@@ -51,7 +51,7 @@ public class strjoin extends FunctionBas
         Iterator<NodeValue> iter = args.iterator() ;
         String sep = iter.next().asString() ;
 
-        List<String> x = new ArrayList<String>() ;
+        List<String> x = new ArrayList<>() ;
         for ( ; iter.hasNext() ; )
         {
             NodeValue arg = iter.next();

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunction.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunction.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunction.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunction.java Tue Jun 24 09:06:50 2014
@@ -68,7 +68,7 @@ public class UserDefinedFunction extends
         if (uri == null || !uri.equals(this.getUri())) throw new ExprBuildException("Incorrect URI passed to build() call, expected <" + this.getUri() + "> but got <" + uri + ">");
         if (this.getArgList().size() != args.size()) throw new ExprBuildException("Incorrect number of arguments for user defined <" + this.getUri() + "> function");
         
-        Map<String, Expr> substitutions = new HashMap<String, Expr>();
+        Map<String, Expr> substitutions = new HashMap<>();
         for (int i = 0; i < this.getArgList().size(); i++) {
             substitutions.put(this.getArgList().get(i).getVarName(), args.get(i));
         }

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunctionDefinition.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunctionDefinition.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunctionDefinition.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunctionDefinition.java Tue Jun 24 09:06:50 2014
@@ -56,7 +56,7 @@ public class UserDefinedFunctionDefiniti
     public UserDefinedFunctionDefinition(String uri, Expr e, List<Var> argList) {
         this.uri = uri;
         this.expr = e;
-        this.argList = new ArrayList<Var>(argList);
+        this.argList = new ArrayList<>(argList);
         
         //Verify that all mentioned variables are in the arguments list
         Set<Var> mentioned = this.expr.getVarsMentioned();

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunctionFactory.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunctionFactory.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunctionFactory.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/function/user/UserDefinedFunctionFactory.java Tue Jun 24 09:06:50 2014
@@ -82,7 +82,7 @@ public class UserDefinedFunctionFactory 
         return factory;
     }
 
-    private Map<String, UserDefinedFunctionDefinition> definitions = new HashMap<String, UserDefinedFunctionDefinition>();
+    private Map<String, UserDefinedFunctionDefinition> definitions = new HashMap<>();
     private boolean preserveDependencies = false;
 
     /**

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java Tue Jun 24 09:06:50 2014
@@ -39,7 +39,7 @@ import com.hp.hpl.jena.util.iterator.Fil
  */
 public class GraphMemPlain extends GraphBase
 {
-    private Set<Triple> triples = new HashSet<Triple>() ;
+    private Set<Triple> triples = new HashSet<>() ;
     
     public GraphMemPlain() {}
     

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphSPARQL.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphSPARQL.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphSPARQL.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphSPARQL.java Tue Jun 24 09:06:50 2014
@@ -140,7 +140,7 @@ public class GraphSPARQL extends GraphBa
         
         QueryIterator qIter = plan.iterator() ;
         //List<Triple> triples = new ArrayList<Triple>() ;
-        List<Triple> triples = new ArrayList<Triple>() ;
+        List<Triple> triples = new ArrayList<>() ;
         
         for (; qIter.hasNext() ; )
         {

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphUnionRead.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphUnionRead.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphUnionRead.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphUnionRead.java Tue Jun 24 09:06:50 2014
@@ -64,7 +64,7 @@ public class GraphUnionRead extends Grap
     @Override
     protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m)
     {
-        IteratorConcat<Triple> iter = new IteratorConcat<Triple>() ;
+        IteratorConcat<Triple> iter = new IteratorConcat<>() ;
         for ( Node gn : graphs )
         {
             if ( ! GraphOps.containsGraph(dataset, gn) )

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformLib.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformLib.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformLib.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformLib.java Tue Jun 24 09:06:50 2014
@@ -134,7 +134,7 @@ public class NodeTransformLib
         // Non-streaming rewrite 
         List<Var> vars = transformVars(transform, table.getVars()) ;
         Iterator<Binding> iter = table.rows() ; 
-        List<Binding> newRows = new ArrayList<Binding>() ;
+        List<Binding> newRows = new ArrayList<>() ;
         for ( ; iter.hasNext() ; ) { 
             Binding b = iter.next() ;
             Binding b2 = transform(b, transform) ;
@@ -158,7 +158,7 @@ public class NodeTransformLib
     /** Do a node->node conversion of a List&lt;Quad&gt; - return original List&lt;Quad&gt; for "no change" */
     public static List<Quad> transformQuads(NodeTransform nodeTransform, List<Quad> quads)
     {
-        List<Quad> x = new ArrayList<Quad>() ;
+        List<Quad> x = new ArrayList<>() ;
         boolean changed = false ; 
         for ( Quad q : quads )
         {
@@ -194,7 +194,7 @@ public class NodeTransformLib
 
     public static List<Var> transformVars(NodeTransform nodeTransform, List<Var> varList)
     {
-        List<Var> varList2 = new ArrayList<Var>(varList.size()) ; 
+        List<Var> varList2 = new ArrayList<>(varList.size()) ;
         boolean changed = false ;
         for ( Var v : varList )
         {
@@ -230,7 +230,7 @@ public class NodeTransformLib
 
     public static List<SortCondition> transform(NodeTransform nodeTransform, List<SortCondition> conditions)
     {
-        List<SortCondition> conditions2 = new ArrayList<SortCondition>() ;
+        List<SortCondition> conditions2 = new ArrayList<>() ;
         boolean same = true ;
         for ( SortCondition sc : conditions )
         {

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformOp.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformOp.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformOp.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/NodeTransformOp.java Tue Jun 24 09:06:50 2014
@@ -204,7 +204,7 @@ class NodeTransformOp extends TransformC
         // Rename the vars in the expression as well.
         // .e.g max(?y) ==> max(?/y)  
         // These need renaming as well.
-        List<ExprAggregator> aggregators = new ArrayList<ExprAggregator>() ;
+        List<ExprAggregator> aggregators = new ArrayList<>() ;
         for ( ExprAggregator agg : opGroup.getAggregators() )
             aggregators.add(agg.applyNodeTransform(transform)) ;
         

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/ParserBase.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/ParserBase.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/ParserBase.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/ParserBase.java Tue Jun 24 09:06:50 2014
@@ -84,7 +84,7 @@ public class ParserBase
     //    BGP causes the map to be cleared at the start of the BGP
     
     LabelToNodeMap activeLabelMap = anonVarLabels ;
-    Set<String> previousLabels = new HashSet<String>() ; 
+    Set<String> previousLabels = new HashSet<>() ;
     
     //LabelToNodeMap listLabelMap = new LabelToNodeMap(true, new VarAlloc("L")) ;
     // ----
@@ -450,7 +450,7 @@ public class ParserBase
             return s ;
         
         // Dump the initial part straight into the string buffer
-        StringBuffer sb = new StringBuffer(s.substring(0,i)) ;
+        StringBuilder sb = new StringBuilder(s.substring(0,i)) ;
         
         for ( ; i < s.length() ; i++ )
         {

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SPARQLParserBase.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SPARQLParserBase.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SPARQLParserBase.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SPARQLParserBase.java Tue Jun 24 09:06:50 2014
@@ -43,7 +43,7 @@ import com.hp.hpl.jena.update.Update ;
 /** Class that has all the parse event operations and other query/update specific things */  
 public class SPARQLParserBase extends ParserBase 
 {
-    private Deque<Query> stack = new ArrayDeque<Query>() ;
+    private Deque<Query> stack = new ArrayDeque<>() ;
     protected Query query ;
     
     protected SPARQLParserBase() {}
@@ -81,8 +81,8 @@ public class SPARQLParserBase extends Pa
     // Level 0 is top level.
     // Level -1 is not in a pattern WHERE clause.
     private int queryLevel = -1 ;
-    private Deque<Set<String>>    stackPreviousLabels = new ArrayDeque<Set<String>>() ;
-    private Deque<LabelToNodeMap> stackCurrentLabels = new ArrayDeque<LabelToNodeMap>() ;
+    private Deque<Set<String>>    stackPreviousLabels = new ArrayDeque<>() ;
+    private Deque<LabelToNodeMap> stackCurrentLabels = new ArrayDeque<>() ;
 
 //    protected UpdateSink getUpdateSink() { return sink ; }
     public void setUpdateSink(UpdateSink sink)
@@ -243,8 +243,8 @@ public class SPARQLParserBase extends Pa
     
     protected void startValuesClause(int line, int col)               
     { 
-        variables = new ArrayList<Var>() ;
-        values = new ArrayList<Binding>() ;
+        variables = new ArrayList<>() ;
+        values = new ArrayList<>() ;
     }
     
     protected void finishValuesClause(int line, int col)
@@ -302,7 +302,7 @@ public class SPARQLParserBase extends Pa
         // Hide used labels already tracked.
         stackPreviousLabels.push(previousLabels) ;
         stackCurrentLabels.push(activeLabelMap) ;
-        previousLabels = new HashSet<String>() ;
+        previousLabels = new HashSet<>() ;
         activeLabelMap.clear() ;
     }
 

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SPARQLParserRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SPARQLParserRegistry.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SPARQLParserRegistry.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SPARQLParserRegistry.java Tue Jun 24 09:06:50 2014
@@ -26,7 +26,7 @@ import com.hp.hpl.jena.query.Syntax ;
 public class SPARQLParserRegistry
 {
     // the map contains the registered factories hashed by the syntaxes
-    Map<Syntax, SPARQLParserFactory> factories = new HashMap<Syntax, SPARQLParserFactory>() ;
+    Map<Syntax, SPARQLParserFactory> factories = new HashMap<>() ;
     
     // Singleton
     static SPARQLParserRegistry registry = null ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SyntaxVarScope.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SyntaxVarScope.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SyntaxVarScope.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/SyntaxVarScope.java Tue Jun 24 09:06:50 2014
@@ -131,15 +131,14 @@ public class SyntaxVarScope
     
     private static void checkExprListAssignment(Collection<Var> vars, VarExprList exprList)
     {
-        Set<Var> vars2 = new LinkedHashSet<Var>(vars) ;
-        
-        for ( Iterator<Var> iter = exprList.getVars().iterator() ; iter.hasNext() ; )
+        Set<Var> vars2 = new LinkedHashSet<>(vars) ;
+
+        for ( Var v : exprList.getVars() )
         {
             // In scope?
-            Var v = iter.next();
-            Expr e = exprList.getExpr(v) ;
-            checkAssignment(vars2, e, v) ;
-            vars2.add(v) ;
+            Expr e = exprList.getExpr( v );
+            checkAssignment( vars2, e, v );
+            vars2.add( v );
         }
     }
     
@@ -151,29 +150,33 @@ public class SyntaxVarScope
             
             // Copy - we need to add variables
             // SELECT (count(*) AS ?C)  (?C+1 as ?D) 
-            List<Var> inScopeVars = new ArrayList<Var>(groupKey.getVars()) ;
+            List<Var> inScopeVars = new ArrayList<>(groupKey.getVars()) ;
             VarExprList exprList = query.getProject() ;
-            
-            for ( Iterator<Var> iter = exprList.getVars().iterator() ; iter.hasNext() ; )
+
+            for ( Var v : exprList.getVars() )
             {
                 // In scope?
-                Var v = iter.next();
-                Expr e = exprList.getExpr(v) ;
+                Expr e = exprList.getExpr( v );
                 if ( e == null )
                 {
-                    if ( ! inScopeVars.contains(v) )
-                        throw new QueryParseException("Non-group key variable in SELECT: "+v, -1 , -1) ;
+                    if ( !inScopeVars.contains( v ) )
+                    {
+                        throw new QueryParseException( "Non-group key variable in SELECT: " + v, -1, -1 );
+                    }
                 }
                 else
                 {
-                    Set<Var> eVars = e.getVarsMentioned() ;
+                    Set<Var> eVars = e.getVarsMentioned();
                     for ( Var v2 : eVars )
                     {
-                        if ( ! inScopeVars.contains(v2) )
-                            throw new QueryParseException("Non-group key variable in SELECT: "+v2+" in expression "+e , -1 , -1) ;
+                        if ( !inScopeVars.contains( v2 ) )
+                        {
+                            throw new QueryParseException(
+                                "Non-group key variable in SELECT: " + v2 + " in expression " + e, -1, -1 );
+                        }
                     }
                 }
-                inScopeVars.add(v) ;
+                inScopeVars.add( v );
             }
         }
     }
@@ -204,14 +207,15 @@ public class SyntaxVarScope
     {
         StringBuilder sb = new StringBuilder() ;
         boolean first = true ;
-        for ( Iterator<Var> iter = exprList.getVars().iterator() ; iter.hasNext() ; )
+        for ( Var v : exprList.getVars() )
         {
-            Var v = iter.next();
-            Expr e = exprList.getExpr(v) ;
-            if ( ! first )
-                sb.append(" ") ;
-            first = false ;
-            sb.append("(").append(e).append(" AS ").append(v).append(")") ;
+            Expr e = exprList.getExpr( v );
+            if ( !first )
+            {
+                sb.append( " " );
+            }
+            first = false;
+            sb.append( "(" ).append( e ).append( " AS " ).append( v ).append( ")" );
         }
         return sb.toString() ;
     }
@@ -275,7 +279,7 @@ public class SyntaxVarScope
         /** Calculate scope, working forwards */
         private static Collection<Var> calcScope(List<Element> elements, int start, int finish)
         {
-            Collection<Var> accScope = new HashSet<Var>() ;
+            Collection<Var> accScope = new HashSet<>() ;
             for ( int i = start ; i < finish ; i++ )
             {
                 Element e = elements.get(i) ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/UpdateParserRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/UpdateParserRegistry.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/UpdateParserRegistry.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/UpdateParserRegistry.java Tue Jun 24 09:06:50 2014
@@ -26,7 +26,7 @@ import com.hp.hpl.jena.query.Syntax ;
 public class UpdateParserRegistry
 {
     // the map contains the registered factories hashed by the syntaxes
-    Map<Syntax, UpdateParserFactory> factories = new HashMap<Syntax, UpdateParserFactory>() ;
+    Map<Syntax, UpdateParserFactory> factories = new HashMap<>() ;
     
     // Singleton
     static UpdateParserRegistry registry = null ;

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ParseException.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ParseException.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ParseException.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ParseException.java Tue Jun 24 09:06:50 2014
@@ -106,20 +106,24 @@ public class ParseException extends Exce
                            int[][] expectedTokenSequences,
                            String[] tokenImage) {
     String eol = System.getProperty("line.separator", "\n");
-    StringBuffer expected = new StringBuffer();
+    StringBuilder expected = new StringBuilder();
     int maxSize = 0;
-    for (int i = 0; i < expectedTokenSequences.length; i++) {
-      if (maxSize < expectedTokenSequences[i].length) {
-        maxSize = expectedTokenSequences[i].length;
+      for ( int[] expectedTokenSequence : expectedTokenSequences )
+      {
+          if ( maxSize < expectedTokenSequence.length )
+          {
+              maxSize = expectedTokenSequence.length;
+          }
+          for ( int anExpectedTokenSequence : expectedTokenSequence )
+          {
+              expected.append( tokenImage[anExpectedTokenSequence] ).append( ' ' );
+          }
+          if ( expectedTokenSequence[expectedTokenSequence.length - 1] != 0 )
+          {
+              expected.append( "..." );
+          }
+          expected.append( eol ).append( "    " );
       }
-      for (int j = 0; j < expectedTokenSequences[i].length; j++) {
-        expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' ');
-      }
-      if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
-        expected.append("...");
-      }
-      expected.append(eol).append("    ");
-    }
     String retval = "Encountered \"";
     Token tok = currentToken.next;
     for (int i = 0; i < maxSize; i++) {

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/TokenMgrError.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/TokenMgrError.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/TokenMgrError.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/TokenMgrError.java Tue Jun 24 09:06:50 2014
@@ -65,7 +65,7 @@ public class TokenMgrError extends Error
    * equivalents in the given string
    */
   protected static final String addEscapes(String str) {
-    StringBuffer retval = new StringBuffer();
+    StringBuilder retval = new StringBuilder();
     char ch;
     for (int i = 0; i < str.length(); i++) {
       switch (str.charAt(i))



Mime
View raw message