jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1605034 [9/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-core/src/main/java/com/hp/hpl/jena/ontology/EnumeratedClass.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/EnumeratedClass.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/EnumeratedClass.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/EnumeratedClass.java Tue Jun 24 09:06:50 2014
@@ -27,7 +27,6 @@ package com.hp.hpl.jena.ontology;
 import java.util.Iterator;
 
 import com.hp.hpl.jena.rdf.model.*;
-import com.hp.hpl.jena.rdf.model.Resource;
 import com.hp.hpl.jena.util.iterator.ExtendedIterator;
 
 

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntDocumentManager.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntDocumentManager.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntDocumentManager.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntDocumentManager.java Tue Jun 24 09:06:50 2014
@@ -134,7 +134,7 @@ public class OntDocumentManager
     protected boolean m_processImports = true;
 
     /** List of URI's that will be ignored when doing imports processing */
-    protected Set<String> m_ignoreImports = new HashSet<String>();
+    protected Set<String> m_ignoreImports = new HashSet<>();
 
     /** Default prefix mapping to use to seed all models */
     protected PrefixMapping m_prefixMap = new PrefixMappingImpl();
@@ -700,7 +700,7 @@ public class OntDocumentManager
      */
     public void loadImports( OntModel model ) {
         if (m_processImports) {
-            List<String> readQueue = new ArrayList<String>();
+            List<String> readQueue = new ArrayList<>();
 
             // add the imported statements from the given model to the processing queue
             queueImports( model, readQueue, model.getProfile() );
@@ -718,7 +718,7 @@ public class OntDocumentManager
      */
     public void loadImport( OntModel model, String uri ) {
         if (m_processImports) {
-            List<String> readQueue = new ArrayList<String>();
+            List<String> readQueue = new ArrayList<>();
             readQueue.add( uri );
             loadImports( model, readQueue );
         }
@@ -733,7 +733,7 @@ public class OntDocumentManager
      */
     public void unloadImport( OntModel model, String uri ) {
         if (m_processImports) {
-            List<String> unloadQueue = new ArrayList<String>();
+            List<String> unloadQueue = new ArrayList<>();
             unloadQueue.add( uri );
             unloadImports( model, unloadQueue );
         }
@@ -791,7 +791,7 @@ public class OntDocumentManager
                 // look up the cached model - if we can't find it, we can't unload the import
                 Model importModel = getModel( importURI );
                 if (importModel != null) {
-                    List<String> imports = new ArrayList<String>();
+                    List<String> imports = new ArrayList<>();
 
                     // collect a list of the imports from the model that is scheduled for removal
                     for (StmtIterator i = importModel.listStatements( null, model.getProfile().IMPORTS(), (RDFNode) null ); i.hasNext(); ) {

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntTools.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntTools.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntTools.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntTools.java Tue Jun 24 09:06:50 2014
@@ -153,8 +153,8 @@ public class OntTools
      * and whose last object is <code>end</code>, or null if no such path exists.
      */
     public static Path findShortestPath( Model m, Resource start, RDFNode end, Filter<Statement> onPath ) {
-        List<Path> bfs = new LinkedList<Path>();
-        Set<Resource> seen = new HashSet<Resource>();
+        List<Path> bfs = new LinkedList<>();
+        Set<Resource> seen = new HashSet<>();
 
         // initialise the paths
         for (Iterator<Statement> i = m.listStatements( start, null, (RDFNode) null ).filterKeep( onPath ); i.hasNext(); ) {
@@ -204,8 +204,8 @@ public class OntTools
      * class hierarchy in <code>m</code>
      */
     public static List<OntClass> namedHierarchyRoots( OntModel m ) {
-        List<OntClass> nhr = new ArrayList<OntClass>();         // named roots
-        List<OntClass> ahr = new ArrayList<OntClass>();         // anon roots
+        List<OntClass> nhr = new ArrayList<>();         // named roots
+        List<OntClass> ahr = new ArrayList<>();         // anon roots
 
         // do the initial partition of the root classes
         partitionByNamed( m.listHierarchyRootClasses(), nhr, ahr );
@@ -465,7 +465,7 @@ public class OntTools
          */
         @Override
         public String toString() {
-            StringBuffer buf = new StringBuffer();
+            StringBuilder buf = new StringBuilder();
             buf.append( "DisjointSet{node=" );
             buf.append( m_node );
             buf.append( ",anc=" );
@@ -481,7 +481,7 @@ public class OntTools
         }
 
         public String toShortString() {
-            StringBuffer buf = new StringBuffer();
+            StringBuilder buf = new StringBuilder();
             buf.append( "DisjointSet{node=" );
             buf.append( m_node );
             buf.append( ",parent=" );
@@ -498,8 +498,8 @@ public class OntTools
      */
     public static class LCAIndex
     {
-        private Map<Resource, DisjointSet> m_setIndex = new HashMap<Resource, DisjointSet>();
-        private Map<Resource, Map<Resource, Resource>> m_lcaIndex = new HashMap<Resource, Map<Resource, Resource>>();
+        private Map<Resource, DisjointSet> m_setIndex = new HashMap<>();
+        private Map<Resource, Map<Resource, Resource>> m_lcaIndex = new HashMap<>();
 
         public Resource getLCA( Resource u, Resource v ) {
             Map<Resource, Resource> map = m_lcaIndex.get( u );
@@ -516,7 +516,7 @@ public class OntTools
         public void setLCA( Resource u, Resource v, Resource lca ) {
             Map<Resource, Resource> uMap = m_lcaIndex.get( u );
             if (uMap == null) {
-                uMap = new HashMap<Resource, Resource>();
+                uMap = new HashMap<>();
                 m_lcaIndex.put( u, uMap );
             }
             uMap.put( v, lca );
@@ -596,15 +596,16 @@ public class OntTools
 
         /** Accept statements with any predicate from <code>preds</code> */
         public PredicatesFilter( Property[] preds ) {
-            m_preds = new HashSet<Property>();
-            for (int i = 0; i < preds.length; i++) {
-                m_preds.add( preds[i] );
+            m_preds = new HashSet<>();
+            for ( Property pred : preds )
+            {
+                m_preds.add( pred );
             }
         }
 
         /** Accept statements with predicate <code>pred</code> */
         public PredicatesFilter( Property pred ) {
-            m_preds = new HashSet<Property>();
+            m_preds = new HashSet<>();
             m_preds.add( pred );
         }
 

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/ProfileRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/ProfileRegistry.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/ProfileRegistry.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/ProfileRegistry.java Tue Jun 24 09:06:50 2014
@@ -71,7 +71,7 @@ public class ProfileRegistry {
     //////////////////////////////////
 
     /** Maps from public URI's to language profiles */
-    private Map<String,Profile> m_registry = new HashMap<String, Profile>();
+    private Map<String,Profile> m_registry = new HashMap<>();
 
 
     // Constructors
@@ -83,8 +83,9 @@ public class ProfileRegistry {
      * </p>
      */
     private ProfileRegistry() {
-        for (int i = 0;  i < s_initData.length;  i++) {
-            registerProfile( (String) s_initData[i][0], (Profile) s_initData[i][1] );
+        for ( Object[] aS_initData : s_initData )
+        {
+            registerProfile( (String) aS_initData[0], (Profile) aS_initData[1] );
         }
     }
 

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/AbstractProfile.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/AbstractProfile.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/AbstractProfile.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/AbstractProfile.java Tue Jun 24 09:06:50 2014
@@ -136,12 +136,13 @@ public abstract class AbstractProfile
         if (m_aliasesMap == null) {
             // aliases map not prepared yet, so initialise using the data from
             // the concrete profile class
-            m_aliasesMap = new OneToManyMap<Resource, Resource>();
-            Resource[][] aliases = aliasTable();  
-            for (int i = 0;  i < aliases.length;  i++) {
+            m_aliasesMap = new OneToManyMap<>();
+            Resource[][] aliases = aliasTable();
+            for ( Resource[] aliase : aliases )
+            {
                 // since alias relationship is symmetric, we record both directions
-                m_aliasesMap.put( aliases[i][0], aliases[i][1] );
-                m_aliasesMap.put( aliases[i][1], aliases[i][0] );
+                m_aliasesMap.put( aliase[0], aliase[1] );
+                m_aliasesMap.put( aliase[1], aliase[0] );
             }
         }     
         return m_aliasesMap;

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/BooleanClassDescriptionImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/BooleanClassDescriptionImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/BooleanClassDescriptionImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/BooleanClassDescriptionImpl.java Tue Jun 24 09:06:50 2014
@@ -125,7 +125,7 @@ public abstract class BooleanClassDescri
      */
     @Override
     public ExtendedIterator<? extends OntClass> listOperands() {
-        return getOperands().iterator().mapWith( new AsMapper<OntClass>( OntClass.class ) );
+        return getOperands().iterator().mapWith( new AsMapper<>( OntClass.class ) );
     }
 
     /**

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/DataRangeImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/DataRangeImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/DataRangeImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/DataRangeImpl.java Tue Jun 24 09:06:50 2014
@@ -153,7 +153,7 @@ public class DataRangeImpl
      */
     @Override
     public ExtendedIterator<Literal> listOneOf() {
-        return getOneOf().iterator().mapWith( new AsMapper<Literal>( Literal.class ) );
+        return getOneOf().iterator().mapWith( new AsMapper<>( Literal.class ) );
     }
 
     /**

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/EnumeratedClassImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/EnumeratedClassImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/EnumeratedClassImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/EnumeratedClassImpl.java Tue Jun 24 09:06:50 2014
@@ -151,7 +151,7 @@ public class EnumeratedClassImpl
      */
     @Override
     public ExtendedIterator<? extends OntResource> listOneOf() {
-        return getOneOf().iterator().mapWith( new AsMapper<OntResource>( OntResource.class ) );
+        return getOneOf().iterator().mapWith( new AsMapper<>( OntResource.class ) );
     }
 
     /**

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/IndividualImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/IndividualImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/IndividualImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/IndividualImpl.java Tue Jun 24 09:06:50 2014
@@ -189,7 +189,7 @@ public class IndividualImpl
     public <T extends OntClass> ExtendedIterator<T> listOntClasses( boolean direct ) {
         @SuppressWarnings("unchecked")
         ExtendedIterator<T> iter = 
-            (ExtendedIterator<T>)listRDFTypes( direct ).mapWith( new ResourceAsMapper<OntClass>( OntClass.class ) );
+            (ExtendedIterator<T>)listRDFTypes( direct ).mapWith( new ResourceAsMapper<>( OntClass.class ) );
         return iter ;
     }
 

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLDLProfile.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLDLProfile.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLDLProfile.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLDLProfile.java Tue Jun 24 09:06:50 2014
@@ -278,12 +278,13 @@ public class OWLDLProfile
     }
 
     /** Map from resource to syntactic/semantic checks that a node can be seen as the given facet */
-    private static HashMap<Class<?>,SupportsCheck> s_supportsChecks = new HashMap<Class<?>, SupportsCheck>();
+    private static HashMap<Class<?>,SupportsCheck> s_supportsChecks = new HashMap<>();
 
     static {
         // initialise the map of supports checks from a table of static data
-        for (int i = 0;  i < s_supportsCheckData.length;  i++) {
-            s_supportsChecks.put( (Class<?>) s_supportsCheckData[i][0], (SupportsCheck) s_supportsCheckData[i][1] );
+        for ( Object[] aS_supportsCheckData : s_supportsCheckData )
+        {
+            s_supportsChecks.put( (Class<?>) aS_supportsCheckData[0], (SupportsCheck) aS_supportsCheckData[1] );
         }
     }
 

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLLiteProfile.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLLiteProfile.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLLiteProfile.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLLiteProfile.java Tue Jun 24 09:06:50 2014
@@ -290,12 +290,13 @@ public class OWLLiteProfile
     //////////////////////////////////
 
     /** Map from resource to syntactic/semantic checks that a node can be seen as the given facet */
-    private static Map<Class<?>, SupportsCheck> s_supportsChecks = new HashMap<Class<?>, SupportsCheck>();
+    private static Map<Class<?>, SupportsCheck> s_supportsChecks = new HashMap<>();
 
     static {
         // initialise the map of supports checks from a table of static data
-        for (int i = 0;  i < s_supportsCheckData.length;  i++) {
-            s_supportsChecks.put( (Class<?>) s_supportsCheckData[i][0], (SupportsCheck) s_supportsCheckData[i][1] );
+        for ( Object[] aS_supportsCheckData : s_supportsCheckData )
+        {
+            s_supportsChecks.put( (Class<?>) aS_supportsCheckData[0], (SupportsCheck) aS_supportsCheckData[1] );
         }
     }
 

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLProfile.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLProfile.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLProfile.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OWLProfile.java Tue Jun 24 09:06:50 2014
@@ -296,7 +296,7 @@ public class OWLProfile
          * @return All <code>rdf:type</code> nodes for <code>n</code> in <code>g</code>
          */
         public Set<Node> allTypes( Node n, Graph g) {
-            Set<Node> types = new HashSet<Node>();
+            Set<Node> types = new HashSet<>();
             for (ExtendedIterator<Triple> i = g.find( n, RDF.type.asNode(), Node.ANY ); i.hasNext(); ) {
                 types.add( i.next().getObject() );
             }
@@ -557,12 +557,13 @@ public class OWLProfile
     //////////////////////////////////
 
     /** Map from resource to syntactic/semantic checks that a node can be seen as the given facet */
-    private static HashMap<Class<?>, SupportsCheck> s_supportsChecks = new HashMap<Class<?>, SupportsCheck>();
+    private static HashMap<Class<?>, SupportsCheck> s_supportsChecks = new HashMap<>();
 
     static {
         // initialise the map of supports checks from a table of static data
-        for (int i = 0;  i < s_supportsCheckData.length;  i++) {
-            s_supportsChecks.put( (Class<?>) s_supportsCheckData[i][0], (SupportsCheck) s_supportsCheckData[i][1] );
+        for ( Object[] aS_supportsCheckData : s_supportsCheckData )
+        {
+            s_supportsChecks.put( (Class<?>) aS_supportsCheckData[0], (SupportsCheck) aS_supportsCheckData[1] );
         }
     }
 

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/ObjectPropertyImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/ObjectPropertyImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/ObjectPropertyImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/ObjectPropertyImpl.java Tue Jun 24 09:06:50 2014
@@ -117,7 +117,7 @@ public class ObjectPropertyImpl
      */
     @Override
     public ExtendedIterator<? extends OntProperty> listInverseOf() {
-        List<OntProperty> objPs = new ArrayList<OntProperty>();
+        List<OntProperty> objPs = new ArrayList<>();
         for (Iterator<? extends OntProperty> i = super.listInverseOf(); i.hasNext(); ) {
             objPs.add( i.next().as( ObjectProperty.class ) );
         }

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntClassImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntClassImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntClassImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntClassImpl.java Tue Jun 24 09:06:50 2014
@@ -604,7 +604,7 @@ public class OntClassImpl
     @Override
     public ExtendedIterator<OntProperty> listDeclaredProperties( boolean direct ) {
         // first collect the candidate properties
-        Set<RDFNode> candSet = new HashSet<RDFNode>();
+        Set<RDFNode> candSet = new HashSet<>();
 
         // if the attached model does inference, it will potentially find more of these
         // than a non-inference model
@@ -613,7 +613,7 @@ public class OntClassImpl
         }
 
         // now we iterate over the candidates and check that they match all domain constraints
-        List<RDFNode> cands = new ArrayList<RDFNode>();
+        List<RDFNode> cands = new ArrayList<>();
         cands.addAll( candSet );
         for (int j = cands.size() -1; j >= 0; j--) {
             Property cand = (Property) cands.get( j );
@@ -624,7 +624,7 @@ public class OntClassImpl
 
         // return the results, using the ont property facet
         return WrappedIterator.create( cands.iterator() )
-                              .mapWith( new AsMapper<OntProperty>( OntProperty.class ) );
+                              .mapWith( new AsMapper<>( OntProperty.class ) );
     }
 
 
@@ -669,7 +669,7 @@ public class OntClassImpl
     public ExtendedIterator<Individual> listInstances( final boolean direct ) {
         return getModel()
                 .listStatements( null, RDF.type, this )
-                .mapWith( new SubjectAsMapper<Individual>( Individual.class ) )
+                .mapWith( new SubjectAsMapper<>( Individual.class ) )
                 .filterKeep( new Filter<Individual>() {
                     @Override
                     public boolean accept( Individual o ) {
@@ -971,8 +971,10 @@ public class OntClassImpl
     protected boolean testDomain( Property p, boolean direct ) {
         // we ignore any property in the OWL, etc namespace
         String namespace = p.getNameSpace();
-        for (int i = 0; i < IGNORE_NAMESPACES.length; i++) {
-            if (namespace.equals( IGNORE_NAMESPACES[i] )) {
+        for ( String IGNORE_NAMESPACE : IGNORE_NAMESPACES )
+        {
+            if ( namespace.equals( IGNORE_NAMESPACE ) )
+            {
                 return false;
             }
         }
@@ -1083,8 +1085,8 @@ public class OntClassImpl
         }
 
         // otherwise, we have to search upwards through the class hierarchy
-        Set<OntClass> seen = new HashSet<OntClass>();
-        List<OntClass> queue = new ArrayList<OntClass>();
+        Set<OntClass> seen = new HashSet<>();
+        List<OntClass> queue = new ArrayList<>();
         queue.add( this );
 
         while (!queue.isEmpty()) {

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntModelImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntModelImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntModelImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntModelImpl.java Tue Jun 24 09:06:50 2014
@@ -88,7 +88,7 @@ public class OntModelImpl extends ModelC
     protected OntModelSpec m_spec;
 
     /** List of URI strings of documents that have been imported into this one */
-    protected Set<String> m_imported = new HashSet<String>();
+    protected Set<String> m_imported = new HashSet<>();
 
     /** Mode switch for strict checking mode */
     protected boolean m_strictMode = true;
@@ -157,8 +157,8 @@ public class OntModelImpl extends ModelC
                 // Protect in case the graph is read-only.
                 // Prefixes are hints
                 String[][] p = spec.getKnownPrefixes();
-                for (int i = 0; i < p.length; i++) {
-                    String[] pair = p[i];
+                for ( String[] pair : p )
+                {
                     setNsPrefix( pair[0], pair[1] );
                 }
             } catch (Exception ex) {}
@@ -457,7 +457,7 @@ public class OntModelImpl extends ModelC
             // it's tricky to make this efficient and cover all possible cases. I've changed the code to
             // make use of the isIndividual() test on OntResource, at the expense of some redundant queries
             // to the model, which could become expensive in the case of a DB model - ijd Apr-23-09
-            Set<Individual> results = new HashSet<Individual>();
+            Set<Individual> results = new HashSet<>();
             for (Iterator<Statement> i = listStatements( null, RDF.type, (RDFNode) null); i.hasNext(); ) {
                 OntResource r = i.next().getSubject().as( OntResource.class );
                 if (r.isIndividual()) {
@@ -531,7 +531,7 @@ public class OntModelImpl extends ModelC
             {
                 // we have have both direct sub-class of and a :Thing class to test against
                 return listStatements( null, ReasonerVocabulary.directSubClassOf, getProfile().THING() )
-                       .mapWith( new OntResourceImpl.SubjectAsMapper<OntClass>( OntClass.class ));
+                       .mapWith( new OntResourceImpl.SubjectAsMapper<>( OntClass.class ));
             }
         }
 
@@ -747,11 +747,11 @@ public class OntModelImpl extends ModelC
         Resource r = getProfile().ANNOTATION_PROPERTY();
 
         if (r == null) {
-            return new NullIterator<AnnotationProperty>();
+            return new NullIterator<>();
         }
         else {
             return findByType( r )
-            		.mapWith( new SubjectNodeAs<AnnotationProperty>( AnnotationProperty.class ) )
+            		.mapWith( new SubjectNodeAs<>( AnnotationProperty.class ) )
             		.filterKeep( new UniqueFilter<AnnotationProperty>());
         }
     }
@@ -2058,8 +2058,8 @@ public class OntModelImpl extends ModelC
      */
     @Override
     public Set<String> listImportedOntologyURIs( boolean closure ) {
-        Set<String> results = new HashSet<String>();
-        List<Model> queue = new ArrayList<Model>();
+        Set<String> results = new HashSet<>();
+        List<Model> queue = new ArrayList<>();
         queue.add( getBaseModel() );
 
         while (!queue.isEmpty()) {
@@ -2356,9 +2356,9 @@ public class OntModelImpl extends ModelC
     @Override
     public int countSubModels() {
         int count = 0;
-        for (Iterator<Graph> i = getSubGraphs().iterator(); i.hasNext(); ) {
+        for ( Graph graph1 : getSubGraphs() )
+        {
             count++;
-            i.next();
         }
         return count;
     }
@@ -2935,7 +2935,7 @@ public class OntModelImpl extends ModelC
      * @return An iterator over all triples <code>_x rdf:type type</code>
      */
     protected <T extends RDFNode> ExtendedIterator<T> findByTypeAs( Resource type, Iterator<Resource> types, Class<T> asKey ) {
-        return findByType( type, types ).mapWith( new SubjectNodeAs<T>( asKey ) );
+        return findByType( type, types ).mapWith( new SubjectNodeAs<>( asKey ) );
     }
 
     /**
@@ -2968,7 +2968,7 @@ public class OntModelImpl extends ModelC
      * the given polymorphic class.
      */
     protected <T extends RDFNode> ExtendedIterator<T> findByTypeAs( Resource type, Class<T> asKey ) {
-        return findByType( type ).mapWith( new SubjectNodeAs<T>( asKey ) );
+        return findByType( type ).mapWith( new SubjectNodeAs<>( asKey ) );
     }
 
     /**
@@ -2995,7 +2995,7 @@ public class OntModelImpl extends ModelC
      * @return ExtendedIterator over subjects of p, presented as the facet.
      */
     protected <T extends RDFNode> ExtendedIterator<T> findByDefiningPropertyAs( Property p, Class<T> asKey ) {
-        return findByDefiningProperty( p ).mapWith( new SubjectNodeAs<T>( asKey ) );
+        return findByDefiningProperty( p ).mapWith( new SubjectNodeAs<>( asKey ) );
     }
 
 

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntPropertyImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntPropertyImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntPropertyImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntPropertyImpl.java Tue Jun 24 09:06:50 2014
@@ -762,7 +762,7 @@ public class OntPropertyImpl
      */
     @Override
     public ExtendedIterator<OntProperty> listInverse() {
-        return getModel().listStatements( null, getProfile().INVERSE_OF(), this ).mapWith( new SubjectAsMapper<OntProperty>( OntProperty.class ) );
+        return getModel().listStatements( null, getProfile().INVERSE_OF(), this ).mapWith( new SubjectAsMapper<>( OntProperty.class ) );
     }
 
     /**
@@ -810,10 +810,10 @@ public class OntPropertyImpl
     public ExtendedIterator<OntClass> listDeclaringClasses( boolean direct ) {
         // first list the candidate classes, which will also help us
         // work out whether this is a "global" property or not
-        Set<OntClass> cands = new HashSet<OntClass>();
+        Set<OntClass> cands = new HashSet<>();
         for (Iterator<OntClass> i = listDomain(); i.hasNext(); ) {
             // the candidates include this class and it sub-classes
-            List<OntClass> q = new ArrayList<OntClass>();
+            List<OntClass> q = new ArrayList<>();
             q.add( i.next() );
 
             while (!q.isEmpty()) {
@@ -874,7 +874,7 @@ public class OntPropertyImpl
     @Override
     public ExtendedIterator<Restriction> listReferringRestrictions() {
         return getModel().listStatements( null, getProfile().ON_PROPERTY(), this )
-                         .mapWith( new SubjectAsMapper<Restriction>( Restriction.class ) );
+                         .mapWith( new SubjectAsMapper<>( Restriction.class ) );
     }
 
 

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntResourceImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntResourceImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntResourceImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntResourceImpl.java Tue Jun 24 09:06:50 2014
@@ -154,8 +154,10 @@ public class OntResourceImpl
     @Override
     public boolean isOntLanguageTerm() {
         if (!isAnon()) {
-            for (int i = 0; i < KNOWN_LANGUAGES.length; i++) {
-                if (getURI().startsWith( KNOWN_LANGUAGES[i] )) {
+            for ( String KNOWN_LANGUAGE : KNOWN_LANGUAGES )
+            {
+                if ( getURI().startsWith( KNOWN_LANGUAGE ) )
+                {
                     return true;
                 }
             }
@@ -1034,9 +1036,9 @@ public class OntResourceImpl
     */
     @Override
     public void remove() {
-        Set<Statement> stmts = new HashSet<Statement>();
-        List<Resource> lists = new ArrayList<Resource>();
-        List<Statement> skip = new ArrayList<Statement>();
+        Set<Statement> stmts = new HashSet<>();
+        List<Resource> lists = new ArrayList<>();
+        List<Statement> skip = new ArrayList<>();
         Property first = getProfile().FIRST();
 
         // collect statements mentioning this object
@@ -1048,19 +1050,21 @@ public class OntResourceImpl
         }
 
         // check for lists
-        for (Iterator<Statement> i = stmts.iterator(); i.hasNext(); ) {
-            Statement s = i.next();
-            if (s.getPredicate().equals( first ) &&
-                s.getObject().equals( this )) {
+        for ( Statement s : stmts )
+        {
+            if ( s.getPredicate().equals( first ) && s.getObject().equals( this ) )
+            {
                 // _this_ is referenced from inside a list
                 // we don't delete this reference, since it would make the list ill-formed
-                log.debug( toString() + " is referened from an RDFList, so will not be fully removed");
+                log.debug( toString() + " is referened from an RDFList, so will not be fully removed" );
                 skip.add( s );
             }
-            else if (s.getObject() instanceof Resource){
+            else if ( s.getObject() instanceof Resource )
+            {
                 // check for list-valued properties
                 Resource obj = s.getResource();
-                if (obj.canAs( RDFList.class )) {
+                if ( obj.canAs( RDFList.class ) )
+                {
                     // this value is a list, so we will want to remove all of the elements
                     lists.add( obj );
                 }
@@ -1068,17 +1072,18 @@ public class OntResourceImpl
         }
 
         // add in the contents of the lists to the statements to be removed
-        for (Iterator<Resource> i = lists.iterator(); i.hasNext(); ) {
-            Resource r = i.next();
-            stmts.addAll( ((RDFListImpl) r.as( RDFList.class )).collectStatements() );
+        for ( Resource r : lists )
+        {
+            stmts.addAll( ( (RDFListImpl) r.as( RDFList.class ) ).collectStatements() );
         }
 
         // skip the contents of the skip list
         stmts.removeAll( skip );
 
         // and then remove the remainder
-        for (Iterator<Statement> i = stmts.iterator();  i.hasNext(); ) {
-            i.next().remove();
+        for ( Statement stmt : stmts )
+        {
+            stmt.remove();
         }
     }
 
@@ -1438,7 +1443,7 @@ public class OntResourceImpl
     /** Answer an iterator for the given property, whose values are .as() some class */
     protected <T extends RDFNode> ExtendedIterator<T> listAs( Property p, String name, Class<T> cls ) {
         checkProfile( p, name );
-        return WrappedIterator.create( listProperties( p ) ).mapWith( new ObjectAsMapper<T>( cls ) );
+        return WrappedIterator.create( listProperties( p ) ).mapWith( new ObjectAsMapper<>( cls ) );
     }
 
 
@@ -1531,7 +1536,7 @@ public class OntResourceImpl
         // determine the subject and object pairs for the list statements calls
         Resource subject = inverse ? null : this;
         Resource object  = inverse ? this : null;
-        Map1<Statement, T> mapper      = inverse ? new SubjectAsMapper<T>( cls ) : new ObjectAsMapper<T>( cls );
+        Map1<Statement, T> mapper      = inverse ? new SubjectAsMapper<>( cls ) : new ObjectAsMapper<>( cls );
 
         // are we working on an inference graph?
         OntModel m = (OntModel) getGraph();
@@ -1573,7 +1578,7 @@ public class OntResourceImpl
                                        .mapWith( mapper );
 
         // collect a list of the candidates
-        List<T> s = new ArrayList<T>();
+        List<T> s = new ArrayList<>();
         for( ; j.hasNext(); ) {
             s.add( j.next() );
         }
@@ -1588,17 +1593,19 @@ public class OntResourceImpl
 
         // first partition the list by equivalence under orderRel
         List<List<T>> partition = ResourceUtils.partition( s, orderRel );
-        Map<Resource, List<T>> equivSets = new HashMap<Resource, List<T>>();
+        Map<Resource, List<T>> equivSets = new HashMap<>();
 
         // then reduce each part of the partition to a singleton, but remember the others
         s.clear();
-        for (Iterator<List<T>> i = partition.iterator(); i.hasNext(); ) {
-            List<T> part = i.next();
+        for ( List<T> part : partition )
+        {
             // if this is a singleton we just add it to the compressed candidates
-            if (part.size() == 1) {
-                s.add( part.get(0) );
+            if ( part.size() == 1 )
+            {
+                s.add( part.get( 0 ) );
             }
-            else {
+            else
+            {
                 // we select a single representative
                 T r = part.remove( 0 );
                 // remember the other equivalent values
@@ -1614,11 +1621,12 @@ public class OntResourceImpl
         s = ResourceUtils.maximalLowerElements( s, orderRel, inverse );
 
         // create a list of these values lower elements, plus their equivalents (if any)
-        List<T> s2 = new ArrayList<T>();
-        for (Iterator<T> i = s.iterator(); i.hasNext(); ) {
-            T r = i.next();
+        List<T> s2 = new ArrayList<>();
+        for ( T r : s )
+        {
             s2.add( r );
-            if (equivSets.containsKey( r )) {
+            if ( equivSets.containsKey( r ) )
+            {
                 s2.addAll( equivSets.get( r ) );
             }
         }

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/RDFSProfile.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/RDFSProfile.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/RDFSProfile.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/RDFSProfile.java Tue Jun 24 09:06:50 2014
@@ -325,12 +325,13 @@ public class RDFSProfile
     //////////////////////////////////
 
     /** Map from resource to syntactic/semantic checks that a node can be seen as the given facet */
-    protected static HashMap<Object, Object> s_supportsChecks = new HashMap<Object, Object>();
+    protected static HashMap<Object, Object> s_supportsChecks = new HashMap<>();
 
     static {
         // initialise the map of supports checks from a table of static data
-        for (int i = 0;  i < s_supportsCheckTable.length;  i++) {
-            s_supportsChecks.put( s_supportsCheckTable[i][0], s_supportsCheckTable[i][1] );
+        for ( Object[] aS_supportsCheckTable : s_supportsCheckTable )
+        {
+            s_supportsChecks.put( aS_supportsCheckTable[0], aS_supportsCheckTable[1] );
         }
     }
 

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaReader.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaReader.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaReader.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaReader.java Tue Jun 24 09:06:50 2014
@@ -390,7 +390,7 @@ public class JenaReader implements RDFRe
                     || str.startsWith(apacheFeaturesURL)) {
                 Boolean old;
                 try {
-                    old = new Boolean(arpf.getSAXParser().getFeature(str));
+                    old = arpf.getSAXParser().getFeature( str );
                 } catch (SAXNotSupportedException ns) {
                     old = null;
                 } catch (SAXNotRecognizedException nr) {
@@ -489,15 +489,14 @@ public class JenaReader implements RDFRe
                 v = Boolean.valueOf((String) v);
             }
             if ((v instanceof Boolean))
-                return new Boolean(options.setEmbedding(((Boolean) v)
-                        .booleanValue()));
+                return options.setEmbedding( ( (Boolean) v ).booleanValue() );
 
             // Illegal value.
             eh.error(new IllegalArgumentException(
                     "Property \"EMBEDDING\" requires a boolean value."));
             boolean old = options.setEmbedding(false);
             options.setEmbedding(old);
-            return new Boolean(old);
+            return old;
 
         }
         if (str.startsWith("ERR_") || str.startsWith("IGN_")
@@ -515,7 +514,7 @@ public class JenaReader implements RDFRe
                             // error, see below.
                         } else {
                             int rslt = options.setErrorMode(cond, val);
-                            return new Integer(rslt);
+                            return rslt;
                         }
                     }
                 } else if (v instanceof Integer) {
@@ -526,7 +525,7 @@ public class JenaReader implements RDFRe
                     case EM_ERROR:
                     case EM_FATAL:
                         int rslt = options.setErrorMode(cond, val);
-                        return new Integer(rslt);
+                        return rslt;
                     default:
                     // error, see below.
                     }
@@ -536,7 +535,7 @@ public class JenaReader implements RDFRe
                         + "\" cannot have value: " + v.toString()));
                 int old = options.setErrorMode(cond, EM_ERROR);
                 options.setErrorMode(cond, old);
-                return new Integer(old);
+                return old;
             }
         }
         

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/NTriple.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/NTriple.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/NTriple.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/NTriple.java Tue Jun 24 09:06:50 2014
@@ -540,7 +540,7 @@ int debugC = 0;
 		if (matcher.matches())
 			return anonymousID;
 		matcher.reset();
-		StringBuffer rslt = new StringBuffer();
+		StringBuilder rslt = new StringBuilder();
 		int lastNotMatched = 0;
 		while (matcher.find()) {
 			

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/ParseException.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/ParseException.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/ParseException.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/ParseException.java Tue Jun 24 09:06:50 2014
@@ -22,6 +22,8 @@ import org.xml.sax.SAXParseException;
 
 import com.hp.hpl.jena.rdf.arp.impl.ARPLocation;
 
+import java.lang.reflect.Field;
+
 /**
  * An exception during the RDF processing of ARP. Note: it is distinguished from
  * an XML related exception from Xerces because while both are
@@ -169,11 +171,17 @@ public class ParseException extends SAXP
     static public String errorCodeName(int errNo) {
         Class<?> c = ARPErrorNumbers.class;
         java.lang.reflect.Field flds[] = c.getDeclaredFields();
-        for (int i = 0; i < flds.length; i++) {
-            try {
-                if (flds[i].getInt(null) == errNo)
-                    return flds[i].getName();
-            } catch (Exception e) {
+        for ( Field fld : flds )
+        {
+            try
+            {
+                if ( fld.getInt( null ) == errNo )
+                {
+                    return fld.getName();
+                }
+            }
+            catch ( Exception e )
+            {
                 // ignore exceptions
             }
         }

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/ParserSupport.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/ParserSupport.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/ParserSupport.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/ParserSupport.java Tue Jun 24 09:06:50 2014
@@ -61,7 +61,7 @@ public class ParserSupport
 			IRI uri = ctxt.uri;
             Map<String,ARPLocation> idsUsedForBase = idsUsed().get(uri);
 			if (idsUsedForBase == null) {
-				idsUsedForBase = new HashMap<String, ARPLocation>();
+				idsUsedForBase = new HashMap<>();
 				idsUsed().put(uri, idsUsedForBase);
 			}
 			ARPLocation prev = idsUsedForBase.get(str);

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/QNameLexer.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/QNameLexer.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/QNameLexer.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/QNameLexer.java Tue Jun 24 09:06:50 2014
@@ -158,7 +158,7 @@ abstract public class QNameLexer impleme
 //        rdfnames.add("li");
 //    }
 
-    static final Set<String> knownRDFProperties = new HashSet<String>();
+    static final Set<String> knownRDFProperties = new HashSet<>();
 
     static final Set<String> knownRDFTypes = knownRDFProperties;
     static {

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/XMLHandler.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/XMLHandler.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/XMLHandler.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/impl/XMLHandler.java Tue Jun 24 09:06:50 2014
@@ -23,31 +23,22 @@
 
 package com.hp.hpl.jena.rdf.arp.impl;
 
-import java.net.MalformedURLException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import org.apache.jena.iri.IRI;
-import org.apache.jena.iri.IRIFactory;
-import com.hp.hpl.jena.rdf.arp.ALiteral;
-import com.hp.hpl.jena.rdf.arp.ARPErrorNumbers;
-import com.hp.hpl.jena.rdf.arp.ARPHandlers;
-import com.hp.hpl.jena.rdf.arp.ARPOptions;
-import com.hp.hpl.jena.rdf.arp.AResource;
-import com.hp.hpl.jena.rdf.arp.ExtendedHandler;
-import com.hp.hpl.jena.rdf.arp.FatalParsingErrorException;
-import com.hp.hpl.jena.rdf.arp.ParseException;
-import com.hp.hpl.jena.rdf.arp.StatementHandler;
-import com.hp.hpl.jena.rdf.arp.states.Frame;
-import com.hp.hpl.jena.rdf.arp.states.FrameI;
-import com.hp.hpl.jena.rdf.arp.states.LookingForRDF;
-import com.hp.hpl.jena.rdf.arp.states.StartStateRDForDescription;
+import java.net.MalformedURLException ;
+import java.util.HashMap ;
+import java.util.Map ;
+
+import org.apache.jena.iri.IRI ;
+import org.apache.jena.iri.IRIFactory ;
+import org.xml.sax.Attributes ;
+import org.xml.sax.Locator ;
+import org.xml.sax.SAXException ;
+import org.xml.sax.SAXParseException ;
+
+import com.hp.hpl.jena.rdf.arp.* ;
+import com.hp.hpl.jena.rdf.arp.states.Frame ;
+import com.hp.hpl.jena.rdf.arp.states.FrameI ;
+import com.hp.hpl.jena.rdf.arp.states.LookingForRDF ;
+import com.hp.hpl.jena.rdf.arp.states.StartStateRDForDescription ;
 
 /**
  * This class converts SAX events into a stream of encapsulated events suitable
@@ -59,7 +50,7 @@ public class XMLHandler extends LexicalH
 
     boolean encodingProblems = false;
 
-    protected Map<IRI, Map<String,ARPLocation>> idsUsed = new HashMap<IRI, Map<String,ARPLocation>>();
+    protected Map<IRI, Map<String,ARPLocation>> idsUsed = new HashMap<>();
     protected int idsUsedCount = 0;
 
     public XMLHandler() {}
@@ -380,7 +371,7 @@ public class XMLHandler extends LexicalH
     private Map<String, Object> nodeIdUserData;
 
     public void initParse(String base, String lang) throws SAXParseException {
-        nodeIdUserData = new HashMap<String, Object>();
+        nodeIdUserData = new HashMap<>();
         idsUsed = 
         	ignoring(WARN_REDEFINITION_OF_ID)?
         			null:
@@ -411,11 +402,10 @@ public class XMLHandler extends LexicalH
 
     void endBnodeScope() {
         if (handlers.getExtendedHandler() != nullScopeHandler) {
-            Iterator<String> it = nodeIdUserData.keySet().iterator();
-            while (it.hasNext()) {
-                String nodeId = it.next();
-                ARPResource bn = new ARPResource(this, nodeId);
-                handlers.getExtendedHandler().endBNodeScope(bn);
+            for ( String nodeId : nodeIdUserData.keySet() )
+            {
+                ARPResource bn = new ARPResource( this, nodeId );
+                handlers.getExtendedHandler().endBNodeScope( bn );
             }
         }
     }

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/IanaLanguageTag.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/IanaLanguageTag.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/IanaLanguageTag.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/IanaLanguageTag.java Tue Jun 24 09:06:50 2014
@@ -38,7 +38,7 @@ import java.util.Map;
  * 7th July 2002.
  */
 public class IanaLanguageTag extends LanguageTag {
-    static final Map<String, IanaLanguageTag[]> all = new HashMap<String, IanaLanguageTag[]>();
+    static final Map<String, IanaLanguageTag[]> all = new HashMap<>();
     static {
         try {
         all.put("lojban",new IanaLanguageTag[]{new IanaLanguageTag("art-lojban")});
@@ -125,13 +125,18 @@ public class IanaLanguageTag extends Lan
         if ( matches == null )
             return null;
         nextMatch:
-        for (int i=0;i<matches.length;i++) {
-            if ( t.tags.length >= matches[i].tags.length ) {
-                for ( int j = 0; j<matches[i].tags.length; j++) {
-                    if (!t.tags[j].equals(matches[i].tags[j]))
+        for ( IanaLanguageTag matche : matches )
+        {
+            if ( t.tags.length >= matche.tags.length )
+            {
+                for ( int j = 0; j < matche.tags.length; j++ )
+                {
+                    if ( !t.tags[j].equals( matche.tags[j] ) )
+                    {
                         continue nextMatch;
+                    }
                 }
-                return matches[i];
+                return matche;
             }
         }
         return null;

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/Iso3166.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/Iso3166.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/Iso3166.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/Iso3166.java Tue Jun 24 09:06:50 2014
@@ -39,7 +39,7 @@ import java.util.Map;
 public class Iso3166  {
 
    
-    static final Map<String, Iso3166> all = new HashMap<String, Iso3166>();
+    static final Map<String, Iso3166> all = new HashMap<>();
 
     /** Creates new Iso639 */
     private Iso3166(String code,String engName) {

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/Iso639.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/Iso639.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/Iso639.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/Iso639.java Tue Jun 24 09:06:50 2014
@@ -36,7 +36,7 @@ public class Iso639  implements Language
      * http://lcweb.loc.gov/standards/iso639-2/englangn.html</a>
      * on the 24th July 2001, and dated 12th October 2000.
      */
-    static final Map<String, Iso639> all = new HashMap<String, Iso639>();
+    static final Map<String, Iso639> all = new HashMap<>();
 
     /** Creates new Iso639 */
     private Iso639(String engName,String two,String term,String bib, int classify) {

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/LanguageTag.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/LanguageTag.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/LanguageTag.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/lang/LanguageTag.java Tue Jun 24 09:06:50 2014
@@ -39,7 +39,7 @@ public class LanguageTag implements Lang
  */
     public LanguageTag(String tag) throws LanguageTagSyntaxException {
        String lc = tag.toLowerCase(Locale.ENGLISH);
-       Vector<String> v = new Vector<String>();
+       Vector<String> v = new Vector<>();
        int subT;
        while (true) {
            subT = lc.indexOf('-');

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/states/AbsXMLLiteral.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/states/AbsXMLLiteral.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/states/AbsXMLLiteral.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/states/AbsXMLLiteral.java Tue Jun 24 09:06:50 2014
@@ -31,7 +31,7 @@ import com.hp.hpl.jena.rdf.arp.impl.XMLH
 public abstract class AbsXMLLiteral extends Frame {
     boolean checkComposingChar = true;
 
-    static Map<String, String> xmlNameSpace = new TreeMap<String, String>();
+    static Map<String, String> xmlNameSpace = new TreeMap<>();
     static {
         xmlNameSpace.put("xml", xmlns);
         xmlNameSpace.put("", "");
@@ -196,8 +196,8 @@ public abstract class AbsXMLLiteral exte
 
         checkComposingChar = true;
         
-        Map<String, String> attrMap = new TreeMap<String, String>();
-        Map<String, String> childNameSpaces = new TreeMap<String, String>();
+        Map<String, String> attrMap = new TreeMap<>();
+        Map<String, String> childNameSpaces = new TreeMap<>();
         startLitElement( uri,  rawName, childNameSpaces);
         for (int i = atts.getLength()-1;i>=0;i--) {
             String ns = atts.getURI(i);

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/states/WantPropertyElement.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/states/WantPropertyElement.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/states/WantPropertyElement.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/states/WantPropertyElement.java Tue Jun 24 09:06:50 2014
@@ -292,7 +292,7 @@ public class WantPropertyElement extends
 
     private String pairwiseIncompatibleErrorMessage(int nextStateCode,
             AttributeLexer ap, String propAttrs) {
-        ArrayList<String> cases = new ArrayList<String>();
+        ArrayList<String> cases = new ArrayList<>();
         if ((nextStateCode & PARSETYPE) != 0)
             cases.add("rdf:parseType");
         if ((nextStateCode & TYPEDLITERAL) != 0)

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/listeners/StatementListener.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/listeners/StatementListener.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/listeners/StatementListener.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/listeners/StatementListener.java Tue Jun 24 09:06:50 2014
@@ -42,10 +42,20 @@ public class StatementListener implement
 /* */
     @Override
     public void addedStatements( Statement [] statements ) 
-        { for (int i = 0; i < statements.length; i += 1) addedStatement( statements[i] ); }
+        {
+            for ( Statement statement : statements )
+            {
+                addedStatement( statement );
+            }
+        }
     @Override
     public void addedStatements( List<Statement> statements ) 
-        { for (int i = 0; i < statements.size(); i += 1) addedStatement( statements.get(i) ); }
+        {
+            for ( Statement statement : statements )
+            {
+                addedStatement( statement );
+            }
+        }
     @Override
     public void addedStatements( StmtIterator statements ) 
         { while (statements.hasNext()) addedStatement( statements.nextStatement() ); }
@@ -54,10 +64,20 @@ public class StatementListener implement
         { addedStatements( m.listStatements() ); }
     @Override
     public void removedStatements( Statement [] statements ) 
-        { for (int i = 0; i < statements.length; i += 1) removedStatement( statements[i] ); }
+        {
+            for ( Statement statement : statements )
+            {
+                removedStatement( statement );
+            }
+        }
     @Override
     public void removedStatements( List<Statement> statements ) 
-        { for (int i = 0; i < statements.size(); i += 1) removedStatement( statements.get(i) ); }
+        {
+            for ( Statement statement : statements )
+            {
+                removedStatement( statement );
+            }
+        }
     @Override
     public void removedStatements( StmtIterator statements ) 
         { while (statements.hasNext()) removedStatement( statements.nextStatement() ); }

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ContNodeIteratorImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ContNodeIteratorImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ContNodeIteratorImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ContNodeIteratorImpl.java Tue Jun 24 09:06:50 2014
@@ -33,7 +33,7 @@ public class ContNodeIteratorImpl extend
     protected int size;
     protected int index = 0;
     protected int numDeleted = 0;
-    protected final List<Integer> moved = new ArrayList<Integer>();
+    protected final List<Integer> moved = new ArrayList<>();
     
     protected final Iterator<Statement> iterator;
     

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ContainerImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ContainerImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ContainerImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ContainerImpl.java Tue Jun 24 09:06:50 2014
@@ -219,7 +219,7 @@ public class ContainerImpl extends Resou
    public NodeIterator listContainerMembers( NodeIteratorFactory f )
         {
         StmtIterator iter = listProperties(); 
-        Vector<Statement> result = new Vector<Statement>();
+        Vector<Statement> result = new Vector<>();
         int maxOrdinal = 0;
         while (iter.hasNext()) {
             Statement stmt = iter.nextStatement();

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/IO_Ctl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/IO_Ctl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/IO_Ctl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/IO_Ctl.java Tue Jun 24 09:06:50 2014
@@ -60,7 +60,7 @@ public class IO_Ctl
         Method m = null ;
         try
         {
-            m = cls.getMethod(staticMethod, new Class<?>[0]) ;
+            m = cls.getMethod(staticMethod ) ;
             m.invoke(null, (Object[])null) ;
         } catch (Exception e) 
         {

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java Tue Jun 24 09:06:50 2014
@@ -146,7 +146,7 @@ public class LiteralImpl extends EnhNode
         } else {
             // typed literal
             if (value instanceof Boolean) {
-                return ((Boolean)value).booleanValue();
+                return (Boolean) value;
             } else {
                 throw new DatatypeFormatException(this.toString() + " is not a Boolean");
             }
@@ -201,7 +201,7 @@ public class LiteralImpl extends EnhNode
         } else {
             Object value = getValue();
             if (value instanceof Character) {
-                return ((Character) value).charValue();
+                return (Character) value;
             } else {
                 throw new DatatypeFormatException(value.toString() + " is not a Character");
             }

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/MemoryModelGetter.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/MemoryModelGetter.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/MemoryModelGetter.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/MemoryModelGetter.java Tue Jun 24 09:06:50 2014
@@ -27,7 +27,7 @@ import com.hp.hpl.jena.rdf.model.ModelRe
 
 public class MemoryModelGetter implements ModelGetter
 	{
-	protected HashMap<String, Model> models = new HashMap<String, Model>();
+	protected HashMap<String, Model> models = new HashMap<>();
 	
 	@Override
     public Model getModel(String URL) 

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ModelCom.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ModelCom.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ModelCom.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ModelCom.java Tue Jun 24 09:06:50 2014
@@ -1061,21 +1061,22 @@ implements Model, PrefixMapping, Lock
     public static void addNamespaces( Model m, Map<String, Set<String>> ns )
     { 
         PrefixMapping pm = m;
-        Iterator<Map.Entry<String, Set<String>>> it  = ns.entrySet().iterator();
-        while (it.hasNext())
+        for ( Map.Entry<String, Set<String>> e : ns.entrySet() )
         {
-            Map.Entry<String, Set<String>> e = it.next();
             String key = e.getKey();
-            Set<String>  values = e.getValue();
+            Set<String> values = e.getValue();
             Set<String> niceValues = CollectionFactory.createHashedSet();
-            Iterator<String> them = values.iterator();
-            while (them.hasNext())
+            for ( String uri : values )
             {
-                String uri = them.next();
-                if (PrefixMappingImpl.isNiceURI( uri )) niceValues.add( uri );
+                if ( PrefixMappingImpl.isNiceURI( uri ) )
+                {
+                    niceValues.add( uri );
+                }
             }
-            if (niceValues.size() == 1)
+            if ( niceValues.size() == 1 )
+            {
                 pm.setNsPrefix( key, niceValues.iterator().next() );
+            }
         }            
     }
 
@@ -1117,9 +1118,11 @@ implements Model, PrefixMapping, Lock
 
     private List<Triple> asTriples( List<Statement> statements )
     {
-        List<Triple> L = new ArrayList<Triple>( statements.size() );
-        for (int i = 0; i < statements.size(); i += 1) 
-            L.add( statements.get(i).asTriple() );
+        List<Triple> L = new ArrayList<>( statements.size() );
+        for ( Statement statement : statements )
+        {
+            L.add( statement.asTriple() );
+        }
         return L;
     }
 
@@ -1410,8 +1413,11 @@ implements Model, PrefixMapping, Lock
 
       public List<Statement> asStatements( List<Triple> triples )
       {
-          List<Statement> L = new ArrayList<Statement>( triples.size() );
-          for (int i = 0; i < triples.size(); i += 1) L.add( asStatement( triples.get(i) ) );
+          List<Statement> L = new ArrayList<>( triples.size() );
+          for ( Triple triple : triples )
+          {
+              L.add( asStatement( triple ) );
+          }
           return L;
       }
 
@@ -1419,7 +1425,7 @@ implements Model, PrefixMapping, Lock
       { return new ModelCom( g ); }
 
       public StmtIterator asStatements( final Iterator<Triple> it ) 
-      { return new StmtIteratorImpl( new Map1Iterator<Triple, Statement>( mapAsStatement, it ) ); }
+      { return new StmtIteratorImpl( new Map1Iterator<>( mapAsStatement, it ) ); }
 
       protected Map1<Triple, Statement> mapAsStatement = new Map1<Triple, Statement>()
           { @Override
@@ -1523,7 +1529,7 @@ implements Model, PrefixMapping, Lock
 
           protected String statementsToString( StmtIterator it )
           {
-              StringBuffer b = new StringBuffer();
+              StringBuilder b = new StringBuilder();
               while (it.hasNext()) b.append( " " ).append( it.nextStatement() );
               return b.toString();
           }

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/NTripleReader.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/NTripleReader.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/NTripleReader.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/NTripleReader.java Tue Jun 24 09:06:50 2014
@@ -36,7 +36,7 @@ public class NTripleReader extends Objec
     static final Logger log = LoggerFactory.getLogger(NTripleReader.class);
 
     private Model model = null;
-    private Hashtable<String, Resource> anons = new Hashtable<String, Resource>();
+    private Hashtable<String, Resource> anons = new Hashtable<>();
 
     private IStream in = null;
     private boolean inErr = false;

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFListImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFListImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFListImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFListImpl.java Tue Jun 24 09:06:50 2014
@@ -778,8 +778,9 @@ public class RDFListImpl
      */
     @Override
     public void removeList() {
-        for (Iterator<Statement> i = collectStatements().iterator(); i.hasNext(); ) {
-            i.next().remove();
+        for ( Statement statement : collectStatements() )
+        {
+            statement.remove();
         }
     }
     
@@ -790,7 +791,7 @@ public class RDFListImpl
      * @return A list of the statements that form the encoding of this list.
      */
     public Set<Statement> collectStatements() {
-        Set<Statement> stmts = new HashSet<Statement>();
+        Set<Statement> stmts = new HashSet<>();
         RDFList l = this;
         
         do {
@@ -833,7 +834,7 @@ public class RDFListImpl
      */
     @Override
     public List<RDFNode> asJavaList() {
-        List<RDFNode> l = new ArrayList<RDFNode>();
+        List<RDFNode> l = new ArrayList<>();
         
         for (Iterator<RDFNode> i = iterator();  i.hasNext(); ) {
             l.add( i.next() );

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFReaderFImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFReaderFImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFReaderFImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFReaderFImpl.java Tue Jun 24 09:06:50 2014
@@ -24,7 +24,6 @@ import com.hp.hpl.jena.shared.*;
 
 import java.util.Arrays;
 import java.util.Properties;
-import com.hp.hpl.jena.JenaRuntime ;
 
 /**
  */

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFWriterFImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFWriterFImpl.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFWriterFImpl.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/RDFWriterFImpl.java Tue Jun 24 09:06:50 2014
@@ -25,7 +25,6 @@ import java.util.Arrays;
 import java.util.Properties;
 import com.hp.hpl.jena.shared.*;
 import com.hp.hpl.jena.n3.N3JenaWriter;
-import com.hp.hpl.jena.JenaRuntime ;
 
 
 /**

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ReifierStd.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ReifierStd.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ReifierStd.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ReifierStd.java Tue Jun 24 09:06:50 2014
@@ -160,7 +160,7 @@ public class ReifierStd
     private static ExtendedIterator<Node> findNodesForTriple(Graph graph, Triple t, boolean oneWillDo)
     {
         ExtendedIterator<Triple> iter = graph.find(Node.ANY, rdfType, statement) ;
-        List<Node> nodes = new ArrayList<Node>() ;
+        List<Node> nodes = new ArrayList<>() ;
         try
         {
             while (iter.hasNext())
@@ -258,7 +258,7 @@ public class ReifierStd
      */
     public static void remove(Graph graph, Node node, Triple triple)
     {
-        Set<Triple> triples = new HashSet<Triple>();
+        Set<Triple> triples = new HashSet<>();
         triplesToZap(graph, triples, node, rdfType, statement) ;
         triplesToZap(graph, triples, node, subject, triple.getSubject()) ;
         triplesToZap(graph, triples, node, predicate, triple.getPredicate()) ;

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/Util.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/Util.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/Util.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/Util.java Tue Jun 24 09:06:50 2014
@@ -161,7 +161,7 @@ public class Util extends Object {
         else
             {
             int start = 0;
-            StringBuffer result = new StringBuffer();
+            StringBuilder result = new StringBuilder();
             do
                 {
                 result.append( s.substring( start, m.start() ) );

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/BaseInfGraph.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/BaseInfGraph.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/BaseInfGraph.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/BaseInfGraph.java Tue Jun 24 09:06:50 2014
@@ -318,7 +318,7 @@ public abstract class BaseInfGraph exten
         if (resultNode.isLiteral()) {
             Object result = resultNode.getLiteralValue();
             if (result instanceof Boolean) {
-                return ((Boolean)result).booleanValue();
+                return (Boolean) result;
             }
         }
         throw new ReasonerException("Global property test returned non-boolean value" +

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/FGraph.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/FGraph.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/FGraph.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/FGraph.java Tue Jun 24 09:06:50 2014
@@ -45,7 +45,7 @@ public class FGraph implements Finder {
      */
     @Override
     public ExtendedIterator<Triple> find(TriplePattern pattern) {
-        if (graph == null) return new NullIterator<Triple>();
+        if (graph == null) return new NullIterator<>();
         return graph.find(pattern.asTripleMatch());
     }
     
@@ -62,7 +62,7 @@ public class FGraph implements Finder {
      */
     @Override
     public ExtendedIterator<Triple> findWithContinuation(TriplePattern pattern, Finder continuation) {
-        if (graph == null) return new NullIterator<Triple>();
+        if (graph == null) return new NullIterator<>();
         if (continuation == null) {
             return graph.find(pattern.asTripleMatch());
         } else {

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/ReasonerRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/ReasonerRegistry.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/ReasonerRegistry.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/ReasonerRegistry.java Tue Jun 24 09:06:50 2014
@@ -48,7 +48,7 @@ public class ReasonerRegistry {
     protected static ReasonerRegistry theRegistry;
 
     /** Map from reasoner URI to the associated factory */
-    protected Map<String, ReasonerFactory> reasonerFactories = new HashMap<String, ReasonerFactory>();
+    protected Map<String, ReasonerFactory> reasonerFactories = new HashMap<>();
 
     /** Union of the all reasoner capability descriptions */
     protected Model allDescriptions;

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/StandardValidityReport.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/StandardValidityReport.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/StandardValidityReport.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/StandardValidityReport.java Tue Jun 24 09:06:50 2014
@@ -29,7 +29,7 @@ import java.util.List;
 public class StandardValidityReport implements ValidityReport {
 
     /** The total set of error reports */
-    protected List<Report> reports = new ArrayList<Report>();
+    protected List<Report> reports = new ArrayList<>();
     
     /** Flag to indicate if there are any error reports so far */
     protected boolean isError;

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/TriplePattern.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/TriplePattern.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/TriplePattern.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/TriplePattern.java Tue Jun 24 09:06:50 2014
@@ -209,8 +209,12 @@ public class TriplePattern implements Cl
         if (Functor.isFunctor(subject)) return false;
         if (Functor.isFunctor(object)) {
             Node[] args = ((Functor)object.getLiteralValue()).getArgs();
-            for (int i = 0; i < args.length; i++) {
-                if (Functor.isFunctor(args[i])) return false;  
+            for ( Node arg : args )
+            {
+                if ( Functor.isFunctor( arg ) )
+                {
+                    return false;
+                }
             }
         }
         return true;

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/rulesys/BasicForwardRuleInfGraph.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/rulesys/BasicForwardRuleInfGraph.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/rulesys/BasicForwardRuleInfGraph.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/rulesys/BasicForwardRuleInfGraph.java Tue Jun 24 09:06:50 2014
@@ -471,7 +471,7 @@ public class BasicForwardRuleInfGraph ex
         this.recordDerivations = recordDerivations;
         engine.setDerivationLogging(recordDerivations);
         if (recordDerivations) {
-            derivations = new OneToManyMap<Triple, Derivation>();
+            derivations = new OneToManyMap<>();
         } else {
             derivations = null;
         }
@@ -492,7 +492,7 @@ public class BasicForwardRuleInfGraph ex
     @Override
     public Iterator<Derivation> getDerivation(Triple t) {
         if (derivations == null) {
-            return new NullIterator<Derivation>();
+            return new NullIterator<>();
         } else {
             return derivations.getAll(t);
         }

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/rulesys/BuiltinRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/rulesys/BuiltinRegistry.java?rev=1605034&r1=1605033&r2=1605034&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/rulesys/BuiltinRegistry.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/reasoner/rulesys/BuiltinRegistry.java Tue Jun 24 09:06:50 2014
@@ -35,10 +35,10 @@ public class BuiltinRegistry {
     public static BuiltinRegistry theRegistry;
     
     /** Mapping from functor name to Builtin implementing it */
-    protected Map<String,Builtin> builtins = new HashMap<String,Builtin>();
+    protected Map<String,Builtin> builtins = new HashMap<>();
     
     /** Mapping from URI of builtin to implementation */
-    protected Map<String,Builtin> builtinsByURI = new HashMap<String,Builtin>();
+    protected Map<String,Builtin> builtinsByURI = new HashMap<>();
     
     // Static initilizer for the singleton instance
     static {



Mime
View raw message