commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [7/7] incubator-commonsrdf git commit: Add final modifier to local variables.
Date Fri, 11 Nov 2016 22:50:53 GMT
Add final modifier to local variables.

Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/56ddbdcf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/56ddbdcf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/56ddbdcf

Branch: refs/heads/master
Commit: 56ddbdcf9faee3232b7ad5bc4dc68615f44b97a4
Parents: 756cbe0
Author: Gary Gregory <ggregory@apache.org>
Authored: Fri Nov 11 14:48:46 2016 -0800
Committer: Gary Gregory <ggregory@apache.org>
Committed: Fri Nov 11 14:48:46 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/commons/rdf/api/Quad.java   |   2 +-
 .../commons/rdf/api/AbstractBlankNodeTest.java  |  48 ++++-----
 .../commons/rdf/api/AbstractDatasetTest.java    | 102 +++++++++----------
 .../commons/rdf/api/AbstractGraphTest.java      |  92 ++++++++---------
 .../apache/commons/rdf/api/AbstractRDFTest.java |  72 ++++++-------
 .../commons/rdf/api/DefaultDatasetTest.java     |   4 +-
 .../commons/rdf/api/DefaultGraphTest.java       |   4 +-
 .../apache/commons/rdf/api/DefaultQuadTest.java |   4 +-
 .../apache/commons/rdf/api/DummyQuadTest.java   |   2 +-
 .../apache/commons/rdf/api/DummyTripleTest.java |   2 +-
 .../rdf/integrationtests/AllToAllTest.java      |  48 ++++-----
 .../org/apache/commons/rdf/jena/JenaRDF.java    |  26 ++---
 .../rdf/jena/experimental/JenaRDFParser.java    |  12 +--
 .../commons/rdf/jena/impl/AbstractQuadLike.java |   4 +-
 .../rdf/jena/impl/InternalJenaFactory.java      |   2 +-
 .../rdf/jena/impl/JenaBlankNodeImpl.java        |   2 +-
 .../commons/rdf/jena/impl/JenaDatasetImpl.java  |  16 +--
 .../commons/rdf/jena/impl/JenaGraphImpl.java    |   6 +-
 .../commons/rdf/jena/impl/JenaIRIImpl.java      |   2 +-
 .../commons/rdf/jena/impl/JenaLiteralImpl.java  |   4 +-
 .../commons/rdf/jena/impl/JenaQuadImpl.java     |   2 +-
 .../commons/rdf/jena/impl/JenaTripleImpl.java   |   2 +-
 .../commons/rdf/jena/JenaServiceLoaderTest.java |   4 +-
 .../jena/TestJenaGraphToCommonsRDFGraph.java    |  30 +++---
 .../commons/rdf/jena/TestRDFParserBuilder.java  |   4 +-
 .../commons/rdf/jsonldjava/JsonLdBlankNode.java |   2 +-
 .../commons/rdf/jsonldjava/JsonLdGraph.java     |   2 +-
 .../commons/rdf/jsonldjava/JsonLdGraphLike.java |  24 ++---
 .../commons/rdf/jsonldjava/JsonLdIRI.java       |   2 +-
 .../commons/rdf/jsonldjava/JsonLdLiteral.java   |   6 +-
 .../commons/rdf/jsonldjava/JsonLdQuad.java      |   2 +-
 .../commons/rdf/jsonldjava/JsonLdQuadLike.java  |   2 +-
 .../commons/rdf/jsonldjava/JsonLdRDF.java       |  20 ++--
 .../commons/rdf/jsonldjava/JsonLdTriple.java    |   2 +-
 .../jsonldjava/experimental/JsonLdParser.java   |  22 ++--
 .../rdf/jsonldjava/JsonLdParserBuilderTest.java |  12 +--
 .../rdf/jsonldjava/JsonLdServiceLoaderTest.java |   4 +-
 .../org/apache/commons/rdf/rdf4j/RDF4J.java     |  48 ++++-----
 .../rdf/rdf4j/experimental/RDF4JParser.java     |  36 +++----
 .../commons/rdf/rdf4j/impl/BlankNodeImpl.java   |   4 +-
 .../rdf/rdf4j/impl/ConvertedStatements.java     |   2 +-
 .../apache/commons/rdf/rdf4j/impl/IRIImpl.java  |   4 +-
 .../commons/rdf/rdf4j/impl/LiteralImpl.java     |   4 +-
 .../commons/rdf/rdf4j/impl/ModelGraphImpl.java  |   4 +-
 .../apache/commons/rdf/rdf4j/impl/QuadImpl.java |   4 +-
 .../rdf/rdf4j/impl/RepositoryDatasetImpl.java   |  60 +++++------
 .../rdf/rdf4j/impl/RepositoryGraphImpl.java     |  44 ++++----
 .../commons/rdf/rdf4j/impl/TripleImpl.java      |   2 +-
 .../commons/rdf/rdf4j/MemoryGraphTest.java      |   4 +-
 .../commons/rdf/rdf4j/NativeStoreGraphTest.java |   6 +-
 .../rdf/rdf4j/RDF4JServiceLoaderTest.java       |   4 +-
 .../commons/rdf/simple/BlankNodeImpl.java       |   4 +-
 .../commons/rdf/simple/DatasetGraphView.java    |   2 +-
 .../apache/commons/rdf/simple/DatasetImpl.java  |  32 +++---
 .../apache/commons/rdf/simple/GraphImpl.java    |  26 ++---
 .../org/apache/commons/rdf/simple/IRIImpl.java  |   2 +-
 .../apache/commons/rdf/simple/LiteralImpl.java  |   6 +-
 .../org/apache/commons/rdf/simple/QuadImpl.java |   2 +-
 .../apache/commons/rdf/simple/SimpleRDF.java    |   2 +-
 .../apache/commons/rdf/simple/TripleImpl.java   |   2 +-
 .../org/apache/commons/rdf/simple/Types.java    |   4 +-
 .../simple/experimental/AbstractRDFParser.java  |  32 +++---
 .../rdf/simple/DummyRDFParserBuilder.java       |   6 +-
 .../rdf/simple/SimpleServiceLoaderTest.java     |   4 +-
 .../commons/rdf/simple/TestWritingGraph.java    |  32 +++---
 .../experimental/AbstractRDFParserTest.java     |  52 +++++-----
 66 files changed, 516 insertions(+), 514 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/api/src/main/java/org/apache/commons/rdf/api/Quad.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/commons/rdf/api/Quad.java b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
index c018769..c007aff 100644
--- a/api/src/main/java/org/apache/commons/rdf/api/Quad.java
+++ b/api/src/main/java/org/apache/commons/rdf/api/Quad.java
@@ -175,7 +175,7 @@ public interface Quad extends QuadLike<BlankNodeOrIRI> {
                 if (!(obj instanceof Triple)) {
                     return false;
                 }
-                Triple other = (Triple) obj;
+                final Triple other = (Triple) obj;
                 return Objects.equals(getSubject(), other.getSubject())
                         && Objects.equals(getPredicate(), other.getPredicate())
                         && Objects.equals(getObject(), other.getObject());

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/api/src/test/java/org/apache/commons/rdf/api/AbstractBlankNodeTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/AbstractBlankNodeTest.java b/api/src/test/java/org/apache/commons/rdf/api/AbstractBlankNodeTest.java
index 31593c5..c123cdc 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/AbstractBlankNodeTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/AbstractBlankNodeTest.java
@@ -58,7 +58,7 @@ public abstract class AbstractBlankNodeTest {
      */
     @Test
     public final void testInternalIdentifier() {
-        BlankNode testNull = new BlankNode() {
+        final BlankNode testNull = new BlankNode() {
             @Override
             public String ntriplesString() {
                 return null;
@@ -69,11 +69,11 @@ public abstract class AbstractBlankNodeTest {
                 return null;
             }
         };
-        BlankNode testAutomatic1 = getBlankNode();
-        BlankNode testAutomatic2 = getBlankNode();
-        BlankNode testManual3a = getBlankNode("3");
-        BlankNode testManual3b = getBlankNode("3");
-        BlankNode testManual4 = getBlankNode("4");
+        final BlankNode testAutomatic1 = getBlankNode();
+        final BlankNode testAutomatic2 = getBlankNode();
+        final BlankNode testManual3a = getBlankNode("3");
+        final BlankNode testManual3b = getBlankNode("3");
+        final BlankNode testManual4 = getBlankNode("4");
 
         // Test against our fake stub
         assertNotEquals(testNull.uniqueReference(), testAutomatic1.uniqueReference());
@@ -96,7 +96,7 @@ public abstract class AbstractBlankNodeTest {
      */
     @Test
     public final void testEquals() {
-        BlankNode testNull = new BlankNode() {
+        final BlankNode testNull = new BlankNode() {
             @Override
             public String ntriplesString() {
                 return null;
@@ -107,11 +107,11 @@ public abstract class AbstractBlankNodeTest {
                 return null;
             }
         };
-        BlankNode testAutomatic1 = getBlankNode();
-        BlankNode testAutomatic2 = getBlankNode();
-        BlankNode testManual3a = getBlankNode("3");
-        BlankNode testManual3b = getBlankNode("3");
-        BlankNode testManual4 = getBlankNode("4");
+        final BlankNode testAutomatic1 = getBlankNode();
+        final BlankNode testAutomatic2 = getBlankNode();
+        final BlankNode testManual3a = getBlankNode("3");
+        final BlankNode testManual3b = getBlankNode("3");
+        final BlankNode testManual4 = getBlankNode("4");
 
         // Test against our fake stub
         assertNotEquals(testNull, testAutomatic1);
@@ -134,7 +134,7 @@ public abstract class AbstractBlankNodeTest {
      */
     @Test
     public final void testHashCode() {
-        BlankNode testNull = new BlankNode() {
+        final BlankNode testNull = new BlankNode() {
             @Override
             public String ntriplesString() {
                 return null;
@@ -145,11 +145,11 @@ public abstract class AbstractBlankNodeTest {
                 return null;
             }
         };
-        BlankNode testAutomatic1 = getBlankNode();
-        BlankNode testAutomatic2 = getBlankNode();
-        BlankNode testManual3a = getBlankNode("3");
-        BlankNode testManual3b = getBlankNode("3");
-        BlankNode testManual4 = getBlankNode("4");
+        final BlankNode testAutomatic1 = getBlankNode();
+        final BlankNode testAutomatic2 = getBlankNode();
+        final BlankNode testManual3a = getBlankNode("3");
+        final BlankNode testManual3b = getBlankNode("3");
+        final BlankNode testManual4 = getBlankNode("4");
 
         // Test against our fake stub
         assertNotEquals(testNull.hashCode(), testAutomatic1.hashCode());
@@ -172,7 +172,7 @@ public abstract class AbstractBlankNodeTest {
      */
     @Test
     public final void testNtriplesString() {
-        BlankNode testNull = new BlankNode() {
+        final BlankNode testNull = new BlankNode() {
             @Override
             public String ntriplesString() {
                 return null;
@@ -183,11 +183,11 @@ public abstract class AbstractBlankNodeTest {
                 return null;
             }
         };
-        BlankNode testAutomatic1 = getBlankNode();
-        BlankNode testAutomatic2 = getBlankNode();
-        BlankNode testManual3a = getBlankNode("3");
-        BlankNode testManual3b = getBlankNode("3");
-        BlankNode testManual4 = getBlankNode("4");
+        final BlankNode testAutomatic1 = getBlankNode();
+        final BlankNode testAutomatic2 = getBlankNode();
+        final BlankNode testManual3a = getBlankNode("3");
+        final BlankNode testManual3b = getBlankNode("3");
+        final BlankNode testManual4 = getBlankNode("4");
 
         // Test against our fake stub
         assertNotEquals(testNull.ntriplesString(), testAutomatic1.ntriplesString());

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/api/src/test/java/org/apache/commons/rdf/api/AbstractDatasetTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/AbstractDatasetTest.java b/api/src/test/java/org/apache/commons/rdf/api/AbstractDatasetTest.java
index eab09b7..505994f 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/AbstractDatasetTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/AbstractDatasetTest.java
@@ -129,8 +129,8 @@ public abstract class AbstractDatasetTest {
     @Test
     public void iterate() throws Exception {
         Assume.assumeTrue(dataset.size() > 0);
-        List<Quad> quads = new ArrayList<>();
-        for (Quad t : dataset.iterate()) {
+        final List<Quad> quads = new ArrayList<>();
+        for (final Quad t : dataset.iterate()) {
             quads.add(t);
         }
         assertEquals(dataset.size(), quads.size());
@@ -138,12 +138,12 @@ public abstract class AbstractDatasetTest {
         //assertTrue(quads.contains(bobNameQuad));
         // java.util.List won't do any BlankNode mapping, so 
         // instead bobNameQuad of let's check for an IRI-centric quad 
-        Quad q = factory.createQuad(graph1, alice, name, aliceName);
+        final Quad q = factory.createQuad(graph1, alice, name, aliceName);
         quads.contains(q);
 
         // aborted iteration
-        Iterable<Quad> iterate = dataset.iterate();
-        Iterator<Quad> it = iterate.iterator();
+        final Iterable<Quad> iterate = dataset.iterate();
+        final Iterator<Quad> it = iterate.iterator();
 
         assertTrue(it.hasNext());
         it.next();
@@ -152,8 +152,8 @@ public abstract class AbstractDatasetTest {
         // second iteration - should start from fresh and
         // get the same count
         long count = 0;
-        Iterable<Quad> iterable = dataset.iterate();
-        for (@SuppressWarnings("unused")
+        final Iterable<Quad> iterable = dataset.iterate();
+        for (@SuppressWarnings("unused") final
         Quad t : iterable) {
             count++;
         }
@@ -171,18 +171,18 @@ public abstract class AbstractDatasetTest {
 
     @Test
     public void iterateFilter() throws Exception {
-        List<RDFTerm> friends = new ArrayList<>();
-        IRI alice = factory.createIRI("http://example.com/alice");
-        IRI knows = factory.createIRI("http://xmlns.com/foaf/0.1/knows");
-        for (Quad t : dataset.iterate(null, alice, knows, null)) {
+        final List<RDFTerm> friends = new ArrayList<>();
+        final IRI alice = factory.createIRI("http://example.com/alice");
+        final IRI knows = factory.createIRI("http://xmlns.com/foaf/0.1/knows");
+        for (final Quad t : dataset.iterate(null, alice, knows, null)) {
             friends.add(t.getObject());
         }
         assertEquals(1, friends.size());
         assertEquals(bob, friends.get(0));
 
         // .. can we iterate over zero hits?
-        Iterable<Quad> iterate = dataset.iterate(Optional.of(graph2), bob, knows, alice);
-        for (Quad unexpected : iterate) {
+        final Iterable<Quad> iterate = dataset.iterate(Optional.of(graph2), bob, knows, alice);
+        for (final Quad unexpected : iterate) {
             fail("Unexpected quad " + unexpected);
         }
         // closeIterable(iterate);
@@ -195,26 +195,26 @@ public abstract class AbstractDatasetTest {
         assertTrue(dataset.contains(Optional.of(graph1), alice, knows, bob));
 
         try (Stream<? extends Quad> stream = dataset.stream()) {
-            Optional<? extends Quad> first = stream.skip(4).findFirst();
+            final Optional<? extends Quad> first = stream.skip(4).findFirst();
             Assume.assumeTrue(first.isPresent());
-            Quad existingQuad = first.get();
+            final Quad existingQuad = first.get();
             assertTrue(dataset.contains(existingQuad));
         }
 
-        Quad nonExistingQuad = factory.createQuad(graph2, bob, knows, alice);
+        final Quad nonExistingQuad = factory.createQuad(graph2, bob, knows, alice);
         assertFalse(dataset.contains(nonExistingQuad));
 
         // An existing quad
-        Quad quad = factory.createQuad(graph1, alice, knows, bob);
+        final Quad quad = factory.createQuad(graph1, alice, knows, bob);
         // FIXME: Should not this always be true?
          assertTrue(dataset.contains(quad));
     }
 
     @Test
     public void remove() throws Exception {
-        long fullSize = dataset.size();
+        final long fullSize = dataset.size();
         dataset.remove(Optional.of(graph1), alice, knows, bob);
-        long shrunkSize = dataset.size();
+        final long shrunkSize = dataset.size();
         assertEquals(1, fullSize - shrunkSize);
 
         dataset.remove(Optional.of(graph1), alice, knows, bob);
@@ -233,7 +233,7 @@ public abstract class AbstractDatasetTest {
 
         Quad otherQuad;
         try (Stream<? extends Quad> stream = dataset.stream()) {
-            Optional<? extends Quad> anyQuad = stream.findAny();
+            final Optional<? extends Quad> anyQuad = stream.findAny();
             Assume.assumeTrue(anyQuad.isPresent());
             otherQuad = anyQuad.get();
         }
@@ -281,7 +281,7 @@ public abstract class AbstractDatasetTest {
     public void getQuadsQuery() throws Exception {
 
         try (Stream<? extends Quad> stream = dataset.stream(Optional.of(graph1), alice, null, null)) {
-            long aliceCount = stream.count();
+            final long aliceCount = stream.count();
             assertTrue(aliceCount > 0);
             Assume.assumeNotNull(aliceName);
             assertEquals(3, aliceCount);
@@ -300,11 +300,11 @@ public abstract class AbstractDatasetTest {
     @Test
     public void addBlankNodesFromMultipleDatasets() {
             // Create two separate Dataset instances
-            Dataset g1 = createDataset1();
-            Dataset g2 = createDataset2();
+            final Dataset g1 = createDataset1();
+            final Dataset g2 = createDataset2();
 
             // and add them to a new Dataset g3
-            Dataset g3 = factory.createDataset();
+            final Dataset g3 = factory.createDataset();
             addAllQuads(g1, g3);
             addAllQuads(g2, g3);
 
@@ -319,7 +319,7 @@ public abstract class AbstractDatasetTest {
             // HashMap!)
 
             // look up BlankNodes by name
-            IRI name = factory.createIRI("http://xmlns.com/foaf/0.1/name");
+            final IRI name = factory.createIRI("http://xmlns.com/foaf/0.1/name");
             try (Stream<? extends Quad> stream = g3.stream(null, null, name, null)) {
                 stream.parallel().forEach(t -> whoIsWho.put(t.getObject().ntriplesString(), t.getSubject()));
             }
@@ -328,13 +328,13 @@ public abstract class AbstractDatasetTest {
             // and contains 4 unique values
             assertEquals(4, new HashSet<>(whoIsWho.values()).size());
 
-            BlankNodeOrIRI b1Alice = whoIsWho.get("\"Alice\"");
+            final BlankNodeOrIRI b1Alice = whoIsWho.get("\"Alice\"");
             assertNotNull(b1Alice);
-            BlankNodeOrIRI b2Bob = whoIsWho.get("\"Bob\"");
+            final BlankNodeOrIRI b2Bob = whoIsWho.get("\"Bob\"");
             assertNotNull(b2Bob);
-            BlankNodeOrIRI b1Charlie = whoIsWho.get("\"Charlie\"");
+            final BlankNodeOrIRI b1Charlie = whoIsWho.get("\"Charlie\"");
             assertNotNull(b1Charlie);
-            BlankNodeOrIRI b2Dave = whoIsWho.get("\"Dave\"");
+            final BlankNodeOrIRI b2Dave = whoIsWho.get("\"Dave\"");
             assertNotNull(b2Dave);
 
             // All blank nodes should differ
@@ -347,7 +347,7 @@ public abstract class AbstractDatasetTest {
 
             // And we should be able to query with them again
             // as we got them back from g3
-            IRI hasChild = factory.createIRI("http://example.com/hasChild");
+            final IRI hasChild = factory.createIRI("http://example.com/hasChild");
             // FIXME: Check graph2 BlankNode in these ..?
             assertTrue(g3.contains(null, b1Alice, hasChild, b2Bob));
             assertTrue(g3.contains(null, b2Dave, hasChild, b1Charlie));
@@ -398,17 +398,17 @@ public abstract class AbstractDatasetTest {
      * uniqueReference
      */
     private Dataset createDataset1() {
-        RDF factory1 = createFactory();
+        final RDF factory1 = createFactory();
 
-        IRI name = factory1.createIRI("http://xmlns.com/foaf/0.1/name");
-        Dataset g1 = factory1.createDataset();
-        BlankNode b1 = createOwnBlankNode("b1", "0240eaaa-d33e-4fc0-a4f1-169d6ced3680");
+        final IRI name = factory1.createIRI("http://xmlns.com/foaf/0.1/name");
+        final Dataset g1 = factory1.createDataset();
+        final BlankNode b1 = createOwnBlankNode("b1", "0240eaaa-d33e-4fc0-a4f1-169d6ced3680");
         g1.add(b1, b1, name, factory1.createLiteral("Alice"));
 
-        BlankNode b2 = createOwnBlankNode("b2", "9de7db45-0ce7-4b0f-a1ce-c9680ffcfd9f");
+        final BlankNode b2 = createOwnBlankNode("b2", "9de7db45-0ce7-4b0f-a1ce-c9680ffcfd9f");
         g1.add(b2, b2, name, factory1.createLiteral("Bob"));
 
-        IRI hasChild = factory1.createIRI("http://example.com/hasChild");
+        final IRI hasChild = factory1.createIRI("http://example.com/hasChild");
         g1.add(null, b1, hasChild, b2);
 
         return g1;
@@ -444,25 +444,25 @@ public abstract class AbstractDatasetTest {
                 if (!(obj instanceof BlankNode)) {
                     return false;
                 }
-                BlankNode other = (BlankNode) obj;
+                final BlankNode other = (BlankNode) obj;
                 return uuid.equals(other.uniqueReference());
             }
         };
     }
 
     private Dataset createDataset2() {
-        RDF factory2 = createFactory();
-        IRI name = factory2.createIRI("http://xmlns.com/foaf/0.1/name");
+        final RDF factory2 = createFactory();
+        final IRI name = factory2.createIRI("http://xmlns.com/foaf/0.1/name");
 
-        Dataset g2 = factory2.createDataset();
+        final Dataset g2 = factory2.createDataset();
 
-        BlankNode b1 = createOwnBlankNode("b1", "bc8d3e45-a08f-421d-85b3-c25b373abf87");
+        final BlankNode b1 = createOwnBlankNode("b1", "bc8d3e45-a08f-421d-85b3-c25b373abf87");
         g2.add(b1, b1, name, factory2.createLiteral("Charlie"));
 
-        BlankNode b2 = createOwnBlankNode("b2", "2209097a-5078-4b03-801a-6a2d2f50d739");
+        final BlankNode b2 = createOwnBlankNode("b2", "2209097a-5078-4b03-801a-6a2d2f50d739");
         g2.add(b2, b2, name, factory2.createLiteral("Dave"));
 
-        IRI hasChild = factory2.createIRI("http://example.com/hasChild");
+        final IRI hasChild = factory2.createIRI("http://example.com/hasChild");
         // NOTE: Opposite direction of loadDataset1
         g2.add(b2, b2, hasChild, b1);
         return g2;
@@ -476,11 +476,11 @@ public abstract class AbstractDatasetTest {
      */
     @Test
     public void getGraphNames() throws Exception {
-        Set<BlankNodeOrIRI> names = dataset.getGraphNames().collect(Collectors.toSet());        
+        final Set<BlankNodeOrIRI> names = dataset.getGraphNames().collect(Collectors.toSet());        
         assertTrue("Can't find graph name " + graph1, names.contains(graph1));
         assertTrue("Found no quads in graph1", dataset.contains(Optional.of(graph1), null, null, null));
         
-        Optional<BlankNodeOrIRI> graphName2 = dataset.getGraphNames().filter(BlankNode.class::isInstance).findAny();
+        final Optional<BlankNodeOrIRI> graphName2 = dataset.getGraphNames().filter(BlankNode.class::isInstance).findAny();
         assertTrue("Could not find graph2-like BlankNode", graphName2.isPresent()); 
         assertTrue("Found no quads in graph2", dataset.contains(graphName2, null, null, null));
 
@@ -491,7 +491,7 @@ public abstract class AbstractDatasetTest {
     
     @Test
     public void getGraph() throws Exception {
-        Graph defaultGraph = dataset.getGraph();
+        final Graph defaultGraph = dataset.getGraph();
         // TODO: Can we assume the default graph was empty before our new triples?
         assertEquals(2, defaultGraph.size());
         assertTrue(defaultGraph.contains(alice, isPrimaryTopicOf, graph1));
@@ -503,7 +503,7 @@ public abstract class AbstractDatasetTest {
     @Test
     public void getGraphNull() throws Exception {
         // Default graph should be present
-        Graph defaultGraph = dataset.getGraph(null).get();
+        final Graph defaultGraph = dataset.getGraph(null).get();
         // TODO: Can we assume the default graph was empty before our new triples?
         assertEquals(2, defaultGraph.size());
         assertTrue(defaultGraph.contains(alice, isPrimaryTopicOf, graph1));
@@ -515,7 +515,7 @@ public abstract class AbstractDatasetTest {
     @Test
     public void getGraph1() throws Exception {
         // graph1 should be present
-        Graph g1 = dataset.getGraph(graph1).get();
+        final Graph g1 = dataset.getGraph(graph1).get();
         assertEquals(4, g1.size());
         
         assertTrue(g1.contains(alice, name, aliceName));
@@ -528,12 +528,12 @@ public abstract class AbstractDatasetTest {
     public void getGraph2() throws Exception {
         // graph2 should be present, even if is named by a BlankNode
         // We'll look up the potentially mapped graph2 blanknode
-        BlankNodeOrIRI graph2Name = (BlankNodeOrIRI) dataset.stream(Optional.empty(), bob, isPrimaryTopicOf, null)
+        final BlankNodeOrIRI graph2Name = (BlankNodeOrIRI) dataset.stream(Optional.empty(), bob, isPrimaryTopicOf, null)
                 .map(Quad::getObject).findAny().get();
         
-        Graph g2 = dataset.getGraph(graph2Name).get();
+        final Graph g2 = dataset.getGraph(graph2Name).get();
         assertEquals(4, g2.size());
-        Triple bobNameTriple = bobNameQuad.asTriple();
+        final Triple bobNameTriple = bobNameQuad.asTriple();
         assertTrue(g2.contains(bobNameTriple));
         assertTrue(g2.contains(bob, member, bnode1));
         assertTrue(g2.contains(bob, member, bnode2));

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java b/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
index bfb47c6..7e32676 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
@@ -90,7 +90,7 @@ public abstract class AbstractGraphTest {
         try {
             bnode1 = factory.createBlankNode("org1");
             bnode2 = factory.createBlankNode("org2");
-        } catch (UnsupportedOperationException ex) {
+        } catch (final UnsupportedOperationException ex) {
             // leave as null
         }
 
@@ -99,7 +99,7 @@ public abstract class AbstractGraphTest {
             companyName = factory.createLiteral("A company");
             aliceName = factory.createLiteral("Alice");
             bobName = factory.createLiteral("Bob", "en-US");
-        } catch (UnsupportedOperationException ex) {
+        } catch (final UnsupportedOperationException ex) {
             // leave as null
         }
 
@@ -115,7 +115,7 @@ public abstract class AbstractGraphTest {
         if (bobName != null) {
             try {
                 bobNameTriple = factory.createTriple(bob, name, bobName);
-            } catch (UnsupportedOperationException ex) {
+            } catch (final UnsupportedOperationException ex) {
                 // leave as null
             }
             if (bobNameTriple != null) {
@@ -145,8 +145,8 @@ public abstract class AbstractGraphTest {
 
         Assume.assumeTrue(graph.size() > 0);
 
-        List<Triple> triples = new ArrayList<>();
-        for (Triple t : graph.iterate()) {
+        final List<Triple> triples = new ArrayList<>();
+        for (final Triple t : graph.iterate()) {
             triples.add(t);
         }
         assertEquals(graph.size(), triples.size());
@@ -155,8 +155,8 @@ public abstract class AbstractGraphTest {
         }
 
         // aborted iteration
-        Iterable<Triple> iterate = graph.iterate();
-        Iterator<Triple> it = iterate.iterator();
+        final Iterable<Triple> iterate = graph.iterate();
+        final Iterator<Triple> it = iterate.iterator();
 
         assertTrue(it.hasNext());
         it.next();
@@ -165,8 +165,8 @@ public abstract class AbstractGraphTest {
         // second iteration - should start from fresh and
         // get the same count
         long count = 0;
-        Iterable<Triple> iterable = graph.iterate();
-        for (@SuppressWarnings("unused")
+        final Iterable<Triple> iterable = graph.iterate();
+        for (@SuppressWarnings("unused") final
         Triple t : iterable) {
             count++;
         }
@@ -184,18 +184,18 @@ public abstract class AbstractGraphTest {
 
     @Test
     public void iterateFilter() throws Exception {
-        List<RDFTerm> friends = new ArrayList<>();
-        IRI alice = factory.createIRI("http://example.com/alice");
-        IRI knows = factory.createIRI("http://xmlns.com/foaf/0.1/knows");
-        for (Triple t : graph.iterate(alice, knows, null)) {
+        final List<RDFTerm> friends = new ArrayList<>();
+        final IRI alice = factory.createIRI("http://example.com/alice");
+        final IRI knows = factory.createIRI("http://xmlns.com/foaf/0.1/knows");
+        for (final Triple t : graph.iterate(alice, knows, null)) {
             friends.add(t.getObject());
         }
         assertEquals(1, friends.size());
         assertEquals(bob, friends.get(0));
 
         // .. can we iterate over zero hits?
-        Iterable<Triple> iterate = graph.iterate(bob, knows, alice);
-        for (Triple unexpected : iterate) {
+        final Iterable<Triple> iterate = graph.iterate(bob, knows, alice);
+        for (final Triple unexpected : iterate) {
             fail("Unexpected triple " + unexpected);
         }
         // closeIterable(iterate);
@@ -208,19 +208,19 @@ public abstract class AbstractGraphTest {
         assertTrue(graph.contains(alice, knows, bob));
 
         try (Stream<? extends Triple> stream = graph.stream()) {
-            Optional<? extends Triple> first = stream.skip(4).findFirst();
+            final Optional<? extends Triple> first = stream.skip(4).findFirst();
             Assume.assumeTrue(first.isPresent());
-            Triple existingTriple = first.get();
+            final Triple existingTriple = first.get();
             assertTrue(graph.contains(existingTriple));
         }
 
-        Triple nonExistingTriple = factory.createTriple(bob, knows, alice);
+        final Triple nonExistingTriple = factory.createTriple(bob, knows, alice);
         assertFalse(graph.contains(nonExistingTriple));
 
         Triple triple = null;
         try {
             triple = factory.createTriple(alice, knows, bob);
-        } catch (UnsupportedOperationException ex) {
+        } catch (final UnsupportedOperationException ex) {
         }
         if (triple != null) {
             // FIXME: Should not this always be true?
@@ -230,9 +230,9 @@ public abstract class AbstractGraphTest {
 
     @Test
     public void remove() throws Exception {
-        long fullSize = graph.size();
+        final long fullSize = graph.size();
         graph.remove(alice, knows, bob);
-        long shrunkSize = graph.size();
+        final long shrunkSize = graph.size();
         assertEquals(1, fullSize - shrunkSize);
 
         graph.remove(alice, knows, bob);
@@ -251,7 +251,7 @@ public abstract class AbstractGraphTest {
 
         Triple otherTriple;
         try (Stream<? extends Triple> stream = graph.stream()) {
-            Optional<? extends Triple> anyTriple = stream.findAny();
+            final Optional<? extends Triple> anyTriple = stream.findAny();
             Assume.assumeTrue(anyTriple.isPresent());
             otherTriple = anyTriple.get();
         }
@@ -298,7 +298,7 @@ public abstract class AbstractGraphTest {
     public void getTriplesQuery() throws Exception {
 
         try (Stream<? extends Triple> stream = graph.stream(alice, null, null)) {
-            long aliceCount = stream.count();
+            final long aliceCount = stream.count();
             assertTrue(aliceCount > 0);
             Assume.assumeNotNull(aliceName);
             assertEquals(3, aliceCount);
@@ -319,11 +319,11 @@ public abstract class AbstractGraphTest {
 
         try {
             // Create two separate Graph instances
-            Graph g1 = createGraph1();
-            Graph g2 = createGraph2();
+            final Graph g1 = createGraph1();
+            final Graph g2 = createGraph2();
 
             // and add them to a new Graph g3
-            Graph g3 = factory.createGraph();
+            final Graph g3 = factory.createGraph();
             addAllTriples(g1, g3);
             addAllTriples(g2, g3);
 
@@ -338,7 +338,7 @@ public abstract class AbstractGraphTest {
             // HashMap!)
 
             // look up BlankNodes by name
-            IRI name = factory.createIRI("http://xmlns.com/foaf/0.1/name");
+            final IRI name = factory.createIRI("http://xmlns.com/foaf/0.1/name");
             try (Stream<? extends Triple> stream = g3.stream(null, name, null)) {
                 stream.parallel().forEach(t -> whoIsWho.put(t.getObject().ntriplesString(), t.getSubject()));
             }
@@ -347,13 +347,13 @@ public abstract class AbstractGraphTest {
             // and contains 4 unique values
             assertEquals(4, new HashSet<>(whoIsWho.values()).size());
 
-            BlankNodeOrIRI b1Alice = whoIsWho.get("\"Alice\"");
+            final BlankNodeOrIRI b1Alice = whoIsWho.get("\"Alice\"");
             assertNotNull(b1Alice);
-            BlankNodeOrIRI b2Bob = whoIsWho.get("\"Bob\"");
+            final BlankNodeOrIRI b2Bob = whoIsWho.get("\"Bob\"");
             assertNotNull(b2Bob);
-            BlankNodeOrIRI b1Charlie = whoIsWho.get("\"Charlie\"");
+            final BlankNodeOrIRI b1Charlie = whoIsWho.get("\"Charlie\"");
             assertNotNull(b1Charlie);
-            BlankNodeOrIRI b2Dave = whoIsWho.get("\"Dave\"");
+            final BlankNodeOrIRI b2Dave = whoIsWho.get("\"Dave\"");
             assertNotNull(b2Dave);
 
             // All blank nodes should differ
@@ -366,7 +366,7 @@ public abstract class AbstractGraphTest {
 
             // And we should be able to query with them again
             // as we got them back from g3
-            IRI hasChild = factory.createIRI("http://example.com/hasChild");
+            final IRI hasChild = factory.createIRI("http://example.com/hasChild");
             assertTrue(g3.contains(b1Alice, hasChild, b2Bob));
             assertTrue(g3.contains(b2Dave, hasChild, b1Charlie));
             // But not
@@ -380,7 +380,7 @@ public abstract class AbstractGraphTest {
             // and these don't have any children (as far as we know)
             assertFalse(g3.contains(b2Bob, hasChild, null));
             assertFalse(g3.contains(b1Charlie, hasChild, null));
-        } catch (UnsupportedOperationException ex) {
+        } catch (final UnsupportedOperationException ex) {
             Assume.assumeNoException(ex);
         }
     }
@@ -419,17 +419,17 @@ public abstract class AbstractGraphTest {
      * uniqueReference
      */
     private Graph createGraph1() {
-        RDF factory1 = createFactory();
+        final RDF factory1 = createFactory();
 
-        IRI name = factory1.createIRI("http://xmlns.com/foaf/0.1/name");
-        Graph g1 = factory1.createGraph();
-        BlankNode b1 = createOwnBlankNode("b1", "0240eaaa-d33e-4fc0-a4f1-169d6ced3680");
+        final IRI name = factory1.createIRI("http://xmlns.com/foaf/0.1/name");
+        final Graph g1 = factory1.createGraph();
+        final BlankNode b1 = createOwnBlankNode("b1", "0240eaaa-d33e-4fc0-a4f1-169d6ced3680");
         g1.add(b1, name, factory1.createLiteral("Alice"));
 
-        BlankNode b2 = createOwnBlankNode("b2", "9de7db45-0ce7-4b0f-a1ce-c9680ffcfd9f");
+        final BlankNode b2 = createOwnBlankNode("b2", "9de7db45-0ce7-4b0f-a1ce-c9680ffcfd9f");
         g1.add(b2, name, factory1.createLiteral("Bob"));
 
-        IRI hasChild = factory1.createIRI("http://example.com/hasChild");
+        final IRI hasChild = factory1.createIRI("http://example.com/hasChild");
         g1.add(b1, hasChild, b2);
 
         return g1;
@@ -465,25 +465,25 @@ public abstract class AbstractGraphTest {
                 if (!(obj instanceof BlankNode)) {
                     return false;
                 }
-                BlankNode other = (BlankNode) obj;
+                final BlankNode other = (BlankNode) obj;
                 return uuid.equals(other.uniqueReference());
             }
         };
     }
 
     private Graph createGraph2() {
-        RDF factory2 = createFactory();
-        IRI name = factory2.createIRI("http://xmlns.com/foaf/0.1/name");
+        final RDF factory2 = createFactory();
+        final IRI name = factory2.createIRI("http://xmlns.com/foaf/0.1/name");
 
-        Graph g2 = factory2.createGraph();
+        final Graph g2 = factory2.createGraph();
 
-        BlankNode b1 = createOwnBlankNode("b1", "bc8d3e45-a08f-421d-85b3-c25b373abf87");
+        final BlankNode b1 = createOwnBlankNode("b1", "bc8d3e45-a08f-421d-85b3-c25b373abf87");
         g2.add(b1, name, factory2.createLiteral("Charlie"));
 
-        BlankNode b2 = createOwnBlankNode("b2", "2209097a-5078-4b03-801a-6a2d2f50d739");
+        final BlankNode b2 = createOwnBlankNode("b2", "2209097a-5078-4b03-801a-6a2d2f50d739");
         g2.add(b2, name, factory2.createLiteral("Dave"));
 
-        IRI hasChild = factory2.createIRI("http://example.com/hasChild");
+        final IRI hasChild = factory2.createIRI("http://example.com/hasChild");
         // NOTE: Opposite direction of loadGraph1
         g2.add(b2, hasChild, b1);
         return g2;

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java b/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java
index bd3865a..85e7b61 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java
@@ -56,9 +56,9 @@ public abstract class AbstractRDFTest {
 
     @Test
     public void testCreateBlankNode() throws Exception {
-        BlankNode bnode = factory.createBlankNode();
+        final BlankNode bnode = factory.createBlankNode();
 
-        BlankNode bnode2 = factory.createBlankNode();
+        final BlankNode bnode2 = factory.createBlankNode();
         assertNotEquals("Second blank node has not got a unique internal identifier", bnode.uniqueReference(),
                 bnode2.uniqueReference());
     }
@@ -67,7 +67,7 @@ public abstract class AbstractRDFTest {
     public void testCreateBlankNodeIdentifierEmpty() throws Exception {
         try {
             factory.createBlankNode("");
-        } catch (IllegalArgumentException e) {
+        } catch (final IllegalArgumentException e) {
             // Expected exception
         }
     }
@@ -116,12 +116,12 @@ public abstract class AbstractRDFTest {
 
     @Test
     public void testCreateGraph() {
-        Graph graph = factory.createGraph();
+        final Graph graph = factory.createGraph();
 
         assertEquals("Graph was not empty", 0, graph.size());
         graph.add(factory.createBlankNode(), factory.createIRI("http://example.com/"), factory.createBlankNode());
 
-        Graph graph2 = factory.createGraph();
+        final Graph graph2 = factory.createGraph();
         assertNotSame(graph, graph2);
         assertEquals("Graph was empty after adding", 1, graph.size());
         assertEquals("New graph was not empty", 0, graph2.size());
@@ -129,33 +129,33 @@ public abstract class AbstractRDFTest {
 
     @Test
     public void testCreateIRI() throws Exception {
-        IRI example = factory.createIRI("http://example.com/");
+        final IRI example = factory.createIRI("http://example.com/");
 
         assertEquals("http://example.com/", example.getIRIString());
         assertEquals("<http://example.com/>", example.ntriplesString());
 
-        IRI term = factory.createIRI("http://example.com/vocab#term");
+        final IRI term = factory.createIRI("http://example.com/vocab#term");
         assertEquals("http://example.com/vocab#term", term.getIRIString());
         assertEquals("<http://example.com/vocab#term>", term.ntriplesString());
 
         // and now for the international fun!
 
-        IRI latin1 = factory.createIRI("http://accént.example.com/première");
+        final IRI latin1 = factory.createIRI("http://accént.example.com/première");
         assertEquals("http://accént.example.com/première", latin1.getIRIString());
         assertEquals("<http://accént.example.com/première>", latin1.ntriplesString());
 
-        IRI cyrillic = factory.createIRI("http://example.испытание/Кириллица");
+        final IRI cyrillic = factory.createIRI("http://example.испытание/Кириллица");
         assertEquals("http://example.испытание/Кириллица", cyrillic.getIRIString());
         assertEquals("<http://example.испытание/Кириллица>", cyrillic.ntriplesString());
 
-        IRI deseret = factory.createIRI("http://𐐀.example.com/𐐀");
+        final IRI deseret = factory.createIRI("http://𐐀.example.com/𐐀");
         assertEquals("http://𐐀.example.com/𐐀", deseret.getIRIString());
         assertEquals("<http://𐐀.example.com/𐐀>", deseret.ntriplesString());
     }
 
     @Test
     public void testCreateLiteral() throws Exception {
-        Literal example = factory.createLiteral("Example");
+        final Literal example = factory.createLiteral("Example");
         assertEquals("Example", example.getLexicalForm());
         assertFalse(example.getLanguageTag().isPresent());
         assertEquals("http://www.w3.org/2001/XMLSchema#string", example.getDatatype().getIRIString());
@@ -165,7 +165,7 @@ public abstract class AbstractRDFTest {
 
     @Test
     public void testCreateLiteralDateTime() throws Exception {
-        Literal dateTime = factory.createLiteral("2014-12-27T00:50:00T-0600",
+        final Literal dateTime = factory.createLiteral("2014-12-27T00:50:00T-0600",
                 factory.createIRI("http://www.w3.org/2001/XMLSchema#dateTime"));
         assertEquals("2014-12-27T00:50:00T-0600", dateTime.getLexicalForm());
         assertFalse(dateTime.getLanguageTag().isPresent());
@@ -176,7 +176,7 @@ public abstract class AbstractRDFTest {
 
     @Test
     public void testCreateLiteralLang() throws Exception {
-        Literal example = factory.createLiteral("Example", "en");
+        final Literal example = factory.createLiteral("Example", "en");
 
         assertEquals("Example", example.getLexicalForm());
         assertEquals("en", example.getLanguageTag().get());
@@ -187,7 +187,7 @@ public abstract class AbstractRDFTest {
     @Test
     public void testCreateLiteralLangISO693_3() throws Exception {
         // see https://issues.apache.org/jira/browse/JENA-827
-        Literal vls = factory.createLiteral("Herbert Van de Sompel", "vls"); // JENA-827
+        final Literal vls = factory.createLiteral("Herbert Van de Sompel", "vls"); // JENA-827
 
         assertEquals("vls", vls.getLanguageTag().get());
         assertEquals("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", vls.getDatatype().getIRIString());
@@ -196,7 +196,7 @@ public abstract class AbstractRDFTest {
 
     @Test
     public void testCreateLiteralString() throws Exception {
-        Literal example = factory.createLiteral("Example",
+        final Literal example = factory.createLiteral("Example",
                 factory.createIRI("http://www.w3.org/2001/XMLSchema#string"));
         assertEquals("Example", example.getLexicalForm());
         assertFalse(example.getLanguageTag().isPresent());
@@ -207,10 +207,10 @@ public abstract class AbstractRDFTest {
 
     @Test
     public void testCreateTripleBnodeBnode() {
-        BlankNode subject = factory.createBlankNode("b1");
-        IRI predicate = factory.createIRI("http://example.com/pred");
-        BlankNode object = factory.createBlankNode("b2");
-        Triple triple = factory.createTriple(subject, predicate, object);
+        final BlankNode subject = factory.createBlankNode("b1");
+        final IRI predicate = factory.createIRI("http://example.com/pred");
+        final BlankNode object = factory.createBlankNode("b2");
+        final Triple triple = factory.createTriple(subject, predicate, object);
 
         // bnode equivalence should be OK as we used the same
         // factory and have not yet inserted Triple into a Graph
@@ -221,10 +221,10 @@ public abstract class AbstractRDFTest {
 
     @Test
     public void testCreateTripleBnodeIRI() {
-        BlankNode subject = factory.createBlankNode("b1");
-        IRI predicate = factory.createIRI("http://example.com/pred");
-        IRI object = factory.createIRI("http://example.com/obj");
-        Triple triple = factory.createTriple(subject, predicate, object);
+        final BlankNode subject = factory.createBlankNode("b1");
+        final IRI predicate = factory.createIRI("http://example.com/pred");
+        final IRI object = factory.createIRI("http://example.com/obj");
+        final Triple triple = factory.createTriple(subject, predicate, object);
 
         // bnode equivalence should be OK as we used the same
         // factory and have not yet inserted Triple into a Graph
@@ -235,10 +235,10 @@ public abstract class AbstractRDFTest {
 
     @Test
     public void testCreateTripleBnodeTriple() {
-        BlankNode subject = factory.createBlankNode();
-        IRI predicate = factory.createIRI("http://example.com/pred");
-        Literal object = factory.createLiteral("Example", "en");
-        Triple triple = factory.createTriple(subject, predicate, object);
+        final BlankNode subject = factory.createBlankNode();
+        final IRI predicate = factory.createIRI("http://example.com/pred");
+        final Literal object = factory.createLiteral("Example", "en");
+        final Triple triple = factory.createTriple(subject, predicate, object);
 
         // bnode equivalence should be OK as we used the same
         // factory and have not yet inserted Triple into a Graph
@@ -252,7 +252,7 @@ public abstract class AbstractRDFTest {
         BlankNode withColon;
         try {
             withColon = factory.createBlankNode("with:colon");
-        } catch (IllegalArgumentException ex) {
+        } catch (final IllegalArgumentException ex) {
             // Good!
             return;
         }
@@ -276,35 +276,35 @@ public abstract class AbstractRDFTest {
 
     @Test(expected = Exception.class)
     public void testInvalidTriplePredicate() {
-        BlankNode subject = factory.createBlankNode("b1");
-        BlankNode predicate = factory.createBlankNode("b2");
-        BlankNode object = factory.createBlankNode("b3");
+        final BlankNode subject = factory.createBlankNode("b1");
+        final BlankNode predicate = factory.createBlankNode("b2");
+        final BlankNode object = factory.createBlankNode("b3");
         factory.createTriple(subject, (IRI) predicate, object);
     }
 
     @Test
     public void hashCodeBlankNode() throws Exception {
-        BlankNode bnode1 = factory.createBlankNode();
+        final BlankNode bnode1 = factory.createBlankNode();
         assertEquals(bnode1.uniqueReference().hashCode(), bnode1.hashCode());
     }
 
     @Test
     public void hashCodeIRI() throws Exception {
-        IRI iri = factory.createIRI("http://example.com/");
+        final IRI iri = factory.createIRI("http://example.com/");
         assertEquals(iri.getIRIString().hashCode(), iri.hashCode());
     }
 
     @Test
     public void hashCodeLiteral() throws Exception {
-        Literal literal = factory.createLiteral("Hello");
+        final Literal literal = factory.createLiteral("Hello");
         assertEquals(Objects.hash(literal.getLexicalForm(), literal.getDatatype(), literal.getLanguageTag()),
                 literal.hashCode());
     }
 
     @Test
     public void hashCodeTriple() throws Exception {
-        IRI iri = factory.createIRI("http://example.com/");
-        Triple triple = factory.createTriple(iri, iri, iri);
+        final IRI iri = factory.createIRI("http://example.com/");
+        final Triple triple = factory.createTriple(iri, iri, iri);
         assertEquals(Objects.hash(iri, iri, iri), triple.hashCode());
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/api/src/test/java/org/apache/commons/rdf/api/DefaultDatasetTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DefaultDatasetTest.java b/api/src/test/java/org/apache/commons/rdf/api/DefaultDatasetTest.java
index 22262da..024c2cf 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/DefaultDatasetTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/DefaultDatasetTest.java
@@ -36,7 +36,7 @@ public class DefaultDatasetTest {
     public void defaultIterate() throws Exception {
         assertFalse(dataset.streamCalled);
         assertFalse(dataset.filteredStreamCalled);
-        for (Quad t : dataset.iterate()) {
+        for (final Quad t : dataset.iterate()) {
             assertEquals(t, new DummyQuad());
         }
         assertTrue(dataset.streamCalled);
@@ -47,7 +47,7 @@ public class DefaultDatasetTest {
     public void defaultFilteredIterate() throws Exception {
         assertFalse(dataset.streamCalled);
         assertFalse(dataset.filteredStreamCalled);
-        for (Quad t : dataset.iterate(null, null, new DummyIRI(2), null)) {
+        for (final Quad t : dataset.iterate(null, null, new DummyIRI(2), null)) {
             assertEquals(t, new DummyQuad());
         }
         assertTrue(dataset.filteredStreamCalled);

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/api/src/test/java/org/apache/commons/rdf/api/DefaultGraphTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DefaultGraphTest.java b/api/src/test/java/org/apache/commons/rdf/api/DefaultGraphTest.java
index 14a32f0..8d6f337 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/DefaultGraphTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/DefaultGraphTest.java
@@ -56,7 +56,7 @@ public class DefaultGraphTest {
     public void defaultIterate() throws Exception {
         assertFalse(graph.streamCalled);
         assertFalse(graph.filteredStreamCalled);
-        for (Triple t : graph.iterate()) {
+        for (final Triple t : graph.iterate()) {
             assertEquals(t, new DummyTriple());
         }
         assertTrue(graph.streamCalled);
@@ -67,7 +67,7 @@ public class DefaultGraphTest {
     public void defaultFilteredIterate() throws Exception {
         assertFalse(graph.streamCalled);
         assertFalse(graph.filteredStreamCalled);
-        for (Triple t : graph.iterate(null, new DummyIRI(2), null)) {
+        for (final Triple t : graph.iterate(null, new DummyIRI(2), null)) {
             assertEquals(t, new DummyTriple());
         }
         assertTrue(graph.filteredStreamCalled);

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/api/src/test/java/org/apache/commons/rdf/api/DefaultQuadTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DefaultQuadTest.java b/api/src/test/java/org/apache/commons/rdf/api/DefaultQuadTest.java
index 53ba26d..00d66b5 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/DefaultQuadTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/DefaultQuadTest.java
@@ -26,8 +26,8 @@ import org.junit.Test;
 public class DefaultQuadTest {
     @Test
     public void asQuad() throws Exception {
-        Quad q = new DummyQuad();
-        Triple t = q.asTriple();
+        final Quad q = new DummyQuad();
+        final Triple t = q.asTriple();
         assertEquals(t, t);
         assertNotEquals(t,  q);
         assertEquals(t, new DummyTriple());

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/api/src/test/java/org/apache/commons/rdf/api/DummyQuadTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyQuadTest.java b/api/src/test/java/org/apache/commons/rdf/api/DummyQuadTest.java
index 17f33bb..560e3fb 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyQuadTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/DummyQuadTest.java
@@ -51,7 +51,7 @@ public class DummyQuadTest {
     
     @Test
     public void testHashCode() {
-        int expected = Objects.hash(quad.getSubject(), quad.getPredicate(), quad.getObject(), quad.getGraphName()); 
+        final int expected = Objects.hash(quad.getSubject(), quad.getPredicate(), quad.getObject(), quad.getGraphName()); 
         assertEquals(expected, quad.hashCode());
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/api/src/test/java/org/apache/commons/rdf/api/DummyTripleTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/DummyTripleTest.java b/api/src/test/java/org/apache/commons/rdf/api/DummyTripleTest.java
index 0fae349..449de6e 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/DummyTripleTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/DummyTripleTest.java
@@ -46,7 +46,7 @@ public class DummyTripleTest {
     
     @Test
     public void testHashCode() {
-        int expected = Objects.hash(triple.getSubject(), triple.getPredicate(), triple.getObject()); 
+        final int expected = Objects.hash(triple.getSubject(), triple.getPredicate(), triple.getObject()); 
         assertEquals(expected, triple.hashCode());
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/integration-tests/src/test/java/org/apache/commons/rdf/integrationtests/AllToAllTest.java
----------------------------------------------------------------------
diff --git a/integration-tests/src/test/java/org/apache/commons/rdf/integrationtests/AllToAllTest.java b/integration-tests/src/test/java/org/apache/commons/rdf/integrationtests/AllToAllTest.java
index 1fe8dd0..f6082b7 100644
--- a/integration-tests/src/test/java/org/apache/commons/rdf/integrationtests/AllToAllTest.java
+++ b/integration-tests/src/test/java/org/apache/commons/rdf/integrationtests/AllToAllTest.java
@@ -56,10 +56,10 @@ public class AllToAllTest {
     @SuppressWarnings("rawtypes")
     @Parameters(name = "{index}: {0}->{1}")
     public static Collection<Object[]> data() {
-        List<Class> factories = Arrays.asList(SimpleRDF.class, JenaRDF.class, RDF4J.class, JsonLdRDF.class);
-        Collection<Object[]> allToAll = new ArrayList<>();
-        for (Class from : factories) {
-            for (Class to : factories) {
+        final List<Class> factories = Arrays.asList(SimpleRDF.class, JenaRDF.class, RDF4J.class, JsonLdRDF.class);
+        final Collection<Object[]> allToAll = new ArrayList<>();
+        for (final Class from : factories) {
+            for (final Class to : factories) {
                 // NOTE: we deliberately include self-to-self here
                 // to test two instances of the same implementation
                 allToAll.add(new Object[] { from, to });
@@ -78,16 +78,16 @@ public class AllToAllTest {
      */
     @Test
     public void addTermsFromOtherFactory() throws Exception {
-        Graph g = graphFactory.createGraph();
-        BlankNode s = nodeFactory.createBlankNode();
-        IRI p = nodeFactory.createIRI("http://example.com/p");
-        Literal o = nodeFactory.createLiteral("Hello");
+        final Graph g = graphFactory.createGraph();
+        final BlankNode s = nodeFactory.createBlankNode();
+        final IRI p = nodeFactory.createIRI("http://example.com/p");
+        final Literal o = nodeFactory.createLiteral("Hello");
 
         g.add(s, p, o);
 
         // blankNode should still work with g.contains()
         assertTrue(g.contains(s, p, o));
-        Triple t1 = g.stream().findAny().get();
+        final Triple t1 = g.stream().findAny().get();
 
         // Can't make assumptions about BlankNode equality - it might
         // have been mapped to a different BlankNode.uniqueReference()
@@ -96,7 +96,7 @@ public class AllToAllTest {
         assertEquals(p, t1.getPredicate());
         assertEquals(o, t1.getObject());
 
-        IRI s2 = nodeFactory.createIRI("http://example.com/s2");
+        final IRI s2 = nodeFactory.createIRI("http://example.com/s2");
         g.add(s2, p, s);
         assertTrue(g.contains(s2, p, s));
 
@@ -104,14 +104,14 @@ public class AllToAllTest {
         // (even if it has a different identifier), e.g.
         // we should be able to do:
 
-        Triple t2 = g.stream(s2, p, null).findAny().get();
+        final Triple t2 = g.stream(s2, p, null).findAny().get();
 
-        BlankNode bnode = (BlankNode) t2.getObject();
+        final BlankNode bnode = (BlankNode) t2.getObject();
         // And that (possibly adapted) BlankNode object should
         // match the subject of t1 statement
         assertEquals(bnode, t1.getSubject());
         // And can be used as a key:
-        Triple t3 = g.stream(bnode, p, null).findAny().get();
+        final Triple t3 = g.stream(bnode, p, null).findAny().get();
         assertEquals(t1, t3);
     }
 
@@ -125,12 +125,12 @@ public class AllToAllTest {
      */
     @Test
     public void addTriplesFromOtherFactory() throws Exception {
-        Graph g = graphFactory.createGraph();
-        BlankNode s = nodeFactory.createBlankNode();
-        IRI p = nodeFactory.createIRI("http://example.com/p");
-        Literal o = nodeFactory.createLiteral("Hello");
+        final Graph g = graphFactory.createGraph();
+        final BlankNode s = nodeFactory.createBlankNode();
+        final IRI p = nodeFactory.createIRI("http://example.com/p");
+        final Literal o = nodeFactory.createLiteral("Hello");
 
-        Triple srcT1 = nodeFactory.createTriple(s, p, o);
+        final Triple srcT1 = nodeFactory.createTriple(s, p, o);
         // This should work even with BlankNode as they are from the same
         // factory
         assertEquals(s, srcT1.getSubject());
@@ -140,7 +140,7 @@ public class AllToAllTest {
 
         // what about the blankNode within?
         assertTrue(g.contains(srcT1));
-        Triple t1 = g.stream().findAny().get();
+        final Triple t1 = g.stream().findAny().get();
 
         // Can't make assumptions about BlankNode equality - it might
         // have been mapped to a different BlankNode.uniqueReference()
@@ -149,8 +149,8 @@ public class AllToAllTest {
         assertEquals(p, t1.getPredicate());
         assertEquals(o, t1.getObject());
 
-        IRI s2 = nodeFactory.createIRI("http://example.com/s2");
-        Triple srcT2 = nodeFactory.createTriple(s2, p, s);
+        final IRI s2 = nodeFactory.createIRI("http://example.com/s2");
+        final Triple srcT2 = nodeFactory.createTriple(s2, p, s);
         g.add(srcT2);
         assertTrue(g.contains(srcT2));
 
@@ -158,14 +158,14 @@ public class AllToAllTest {
         // (even if it has a different identifier), e.g.
         // we should be able to do:
 
-        Triple t2 = g.stream(s2, p, null).findAny().get();
+        final Triple t2 = g.stream(s2, p, null).findAny().get();
 
-        BlankNode bnode = (BlankNode) t2.getObject();
+        final BlankNode bnode = (BlankNode) t2.getObject();
         // And that (possibly adapted) BlankNode object should
         // match the subject of t1 statement
         assertEquals(bnode, t1.getSubject());
         // And can be used as a key:
-        Triple t3 = g.stream(bnode, p, null).findAny().get();
+        final Triple t3 = g.stream(bnode, p, null).findAny().get();
         assertEquals(t1, t3);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java b/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
index 5ca8f66..92c0adb 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/JenaRDF.java
@@ -266,14 +266,14 @@ public final class JenaRDF implements RDF {
             return factory.createIRI(node.getURI());
         }
         if (node.isLiteral()) {
-            String lang = node.getLiteralLanguage();
+            final String lang = node.getLiteralLanguage();
             if (lang != null && !lang.isEmpty()) {
                 return factory.createLiteral(node.getLiteralLexicalForm(), lang);
             }
             if (node.getLiteralDatatype().equals(XSDDatatype.XSDstring)) {
                 return factory.createLiteral(node.getLiteralLexicalForm());
             }
-            IRI dt = factory.createIRI(node.getLiteralDatatype().getURI());
+            final IRI dt = factory.createIRI(node.getLiteralDatatype().getURI());
             return factory.createLiteral(node.getLiteralLexicalForm(), dt);
         }
         if (node.isBlank()) {
@@ -392,10 +392,10 @@ public final class JenaRDF implements RDF {
         try {
             subject = (BlankNodeOrIRI) asRDFTerm(factory, triple.getSubject());
             predicate = (IRI) asRDFTerm(factory, triple.getPredicate());
-        } catch (ClassCastException ex) {
+        } catch (final ClassCastException ex) {
             throw new ConversionException("Can't convert generalized triple: " + triple, ex);
         }
-        RDFTerm object = asRDFTerm(factory, triple.getObject());
+        final RDFTerm object = asRDFTerm(factory, triple.getObject());
         return factory.createTriple(subject, predicate, object);
     }
 
@@ -529,10 +529,10 @@ public final class JenaRDF implements RDF {
             // No need to convert, just wrap
             return ((JenaRDF) factory).asQuad(quad);
         }
-        BlankNodeOrIRI graphName = (BlankNodeOrIRI) (asRDFTerm(factory, quad.getGraph()));
-        BlankNodeOrIRI subject = (BlankNodeOrIRI) (asRDFTerm(factory, quad.getSubject()));
-        IRI predicate = (IRI) (asRDFTerm(factory, quad.getPredicate()));
-        RDFTerm object = asRDFTerm(factory, quad.getObject());
+        final BlankNodeOrIRI graphName = (BlankNodeOrIRI) (asRDFTerm(factory, quad.getGraph()));
+        final BlankNodeOrIRI subject = (BlankNodeOrIRI) (asRDFTerm(factory, quad.getSubject()));
+        final IRI predicate = (IRI) (asRDFTerm(factory, quad.getPredicate()));
+        final RDFTerm object = asRDFTerm(factory, quad.getObject());
         return factory.createQuad(graphName, subject, predicate, object);
     }
 
@@ -645,7 +645,7 @@ public final class JenaRDF implements RDF {
         if (graph instanceof JenaGraph) {
             return ((JenaGraph) graph).asJenaGraph();
         }
-        org.apache.jena.graph.Graph g = GraphFactory.createGraphMem();
+        final org.apache.jena.graph.Graph g = GraphFactory.createGraphMem();
         graph.stream().forEach(t -> g.add(asJenaTriple(t)));
         return g;
     }
@@ -675,14 +675,14 @@ public final class JenaRDF implements RDF {
         }
 
         if (term instanceof Literal) {
-            Literal lit = (Literal) term;
-            RDFDatatype dt = NodeFactory.getType(lit.getDatatype().getIRIString());
-            String lang = lit.getLanguageTag().orElse("");
+            final Literal lit = (Literal) term;
+            final RDFDatatype dt = NodeFactory.getType(lit.getDatatype().getIRIString());
+            final String lang = lit.getLanguageTag().orElse("");
             return NodeFactory.createLiteral(lit.getLexicalForm(), lang, dt);
         }
 
         if (term instanceof BlankNode) {
-            String id = ((BlankNode) term).uniqueReference();
+            final String id = ((BlankNode) term).uniqueReference();
             return NodeFactory.createBlankNode(id);
         }
         throw new ConversionException("Not a concrete RDF Term: " + term);

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/main/java/org/apache/commons/rdf/jena/experimental/JenaRDFParser.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/experimental/JenaRDFParser.java b/jena/src/main/java/org/apache/commons/rdf/jena/experimental/JenaRDFParser.java
index 12eea05..4921617 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/experimental/JenaRDFParser.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/experimental/JenaRDFParser.java
@@ -49,14 +49,14 @@ public class JenaRDFParser extends AbstractRDFParser<JenaRDFParser> implements R
     }
 
     public JenaRDFParser targetGeneralizedTriple(final Consumer<TripleLike> consumer) {
-        JenaRDFParser c = this.clone();
+        final JenaRDFParser c = this.clone();
         c.resetTarget();
         c.generalizedConsumerTriple = consumer;
         return c;
     }
 
     public JenaRDFParser targetGeneralizedQuad(final Consumer<QuadLike<RDFTerm>> consumer) {
-        JenaRDFParser c = this.clone();
+        final JenaRDFParser c = this.clone();
         c.resetTarget();
         c.generalizedConsumerQuad = consumer;
         return c;
@@ -72,9 +72,9 @@ public class JenaRDFParser extends AbstractRDFParser<JenaRDFParser> implements R
     @Override
     protected void parseSynchronusly() throws IOException {
         StreamRDF dest;
-        JenaRDF jenaRDF = getJenaFactory();
+        final JenaRDF jenaRDF = getJenaFactory();
         if (getTargetGraph().isPresent() && getTargetGraph().get() instanceof JenaGraph) {
-            Graph jenaGraph = ((JenaGraph) getTargetGraph().get()).asJenaGraph();
+            final Graph jenaGraph = ((JenaGraph) getTargetGraph().get()).asJenaGraph();
             dest = StreamRDFLib.graph(jenaGraph);
         } else {
             if (generalizedConsumerQuad != null) {
@@ -86,8 +86,8 @@ public class JenaRDFParser extends AbstractRDFParser<JenaRDFParser> implements R
             }
         }
 
-        Lang lang = getContentTypeSyntax().flatMap(jenaRDF::asJenaLang).orElse(null);
-        String baseStr = getBase().map(IRI::getIRIString).orElse(null);
+        final Lang lang = getContentTypeSyntax().flatMap(jenaRDF::asJenaLang).orElse(null);
+        final String baseStr = getBase().map(IRI::getIRIString).orElse(null);
 
         if (getSourceIri().isPresent()) {
             RDFDataMgr.parse(dest, getSourceIri().get().toString(), baseStr, lang, null);

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/main/java/org/apache/commons/rdf/jena/impl/AbstractQuadLike.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/AbstractQuadLike.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/AbstractQuadLike.java
index 81e7d17..9a4c94b 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/AbstractQuadLike.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/AbstractQuadLike.java
@@ -90,7 +90,7 @@ abstract class AbstractQuadLike<S extends RDFTerm, P extends RDFTerm, O extends
 
     @Override
     public org.apache.jena.sparql.core.Quad asJenaQuad() {
-        JenaRDF factory = new JenaRDF();
+        final JenaRDF factory = new JenaRDF();
         if (quad == null) {
             quad = org.apache.jena.sparql.core.Quad.create(factory.asJenaNode(graphName.orElse(null)),
                     factory.asJenaNode(subject), factory.asJenaNode(predicate), factory.asJenaNode(object));
@@ -100,7 +100,7 @@ abstract class AbstractQuadLike<S extends RDFTerm, P extends RDFTerm, O extends
 
     @Override
     public org.apache.jena.graph.Triple asJenaTriple() {
-        JenaRDF factory = new JenaRDF();
+        final JenaRDF factory = new JenaRDF();
         if (triple == null) {
             triple = org.apache.jena.graph.Triple.create(factory.asJenaNode(subject), factory.asJenaNode(predicate),
                     factory.asJenaNode(object));

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/main/java/org/apache/commons/rdf/jena/impl/InternalJenaFactory.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/InternalJenaFactory.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/InternalJenaFactory.java
index 80a9d3d..f465309 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/InternalJenaFactory.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/InternalJenaFactory.java
@@ -71,7 +71,7 @@ public abstract class InternalJenaFactory {
     }
 
     public JenaDataset createDataset(final UUID salt) {
-        DatasetGraph dg = DatasetGraphFactory.createGeneral();
+        final DatasetGraph dg = DatasetGraphFactory.createGeneral();
         // Or which createMethod() -- a bit confusing with lots of choice..
         return new JenaDatasetImpl(dg, salt);
     }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaBlankNodeImpl.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaBlankNodeImpl.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaBlankNodeImpl.java
index d8eaa23..89ed5b6 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaBlankNodeImpl.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaBlankNodeImpl.java
@@ -47,7 +47,7 @@ class JenaBlankNodeImpl extends AbstractJenaRDFTerm implements JenaBlankNode {
         if (!(other instanceof BlankNode)) {
             return false;
         }
-        BlankNode bNode = (BlankNode) other;
+        final BlankNode bNode = (BlankNode) other;
         return uniqueReference().equals(bNode.uniqueReference());
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java
index ddebc19..9e4eac2 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java
@@ -122,7 +122,7 @@ class JenaDatasetImpl implements JenaDataset {
 
     @Override
     public long size() {
-        long quads = Iter.asStream(graph.listGraphNodes())
+        final long quads = Iter.asStream(graph.listGraphNodes())
                 .map(graph::getGraph)
                 .collect(Collectors.summingLong(org.apache.jena.graph.Graph::size));
         return quads + graph.getDefaultGraph().size();
@@ -130,45 +130,45 @@ class JenaDatasetImpl implements JenaDataset {
 
     @Override
     public Stream<? extends Quad> stream() {
-        JenaRDF factory = new JenaRDF(salt);
+        final JenaRDF factory = new JenaRDF(salt);
         return Iter.asStream(graph.find(ANY, ANY, ANY, ANY), true).map(factory::asQuad);
     }
 
     @Override
     public Stream<? extends Quad> stream(final Optional<BlankNodeOrIRI> g, final BlankNodeOrIRI s, final IRI p, final RDFTerm o) {
-        JenaRDF factory = new JenaRDF(salt);
+        final JenaRDF factory = new JenaRDF(salt);
         return Iter.asStream(graph.find(toJenaPattern(g), toJenaPattern(s), toJenaPattern(p), toJenaPattern(o)), true)
                 .map(factory::asQuad);
     }
 
     @Override
     public String toString() {
-        StringWriter sw = new StringWriter();
+        final StringWriter sw = new StringWriter();
         RDFDataMgr.write(sw, graph, Lang.NT);
         return sw.toString();
     }
 
     @Override
     public Graph getGraph() {
-        GraphView g = GraphView.createDefaultGraph(graph);
+        final GraphView g = GraphView.createDefaultGraph(graph);
         return new JenaGraphImpl(g, salt);
     }
 
     @Override
     public JenaGraph getUnionGraph() {
-        GraphView gv = GraphView.createUnionGraph(graph);
+        final GraphView gv = GraphView.createUnionGraph(graph);
         return new JenaGraphImpl(gv, salt);
     }
 
     @Override
     public Optional<Graph> getGraph(final BlankNodeOrIRI graphName) {
-        GraphView gv = GraphView.createNamedGraph(graph, factory.asJenaNode(graphName));
+        final GraphView gv = GraphView.createNamedGraph(graph, factory.asJenaNode(graphName));
         return Optional.of(new JenaGraphImpl(gv, salt));
     }
 
     @Override
     public Stream<BlankNodeOrIRI> getGraphNames() {
-        JenaRDF factory = new JenaRDF(salt);
+        final JenaRDF factory = new JenaRDF(salt);
         return Iter.asStream(graph.listGraphNodes()).map(node -> (BlankNodeOrIRI) factory.asRDFTerm(node));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraphImpl.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraphImpl.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraphImpl.java
index 6454ac3..e3805b6 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraphImpl.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraphImpl.java
@@ -116,13 +116,13 @@ class JenaGraphImpl implements JenaGraph {
 
     @Override
     public Stream<? extends Triple> stream() {
-        JenaRDF factory = new JenaRDF(salt);
+        final JenaRDF factory = new JenaRDF(salt);
         return Iter.asStream(graph.find(null, null, null), true).map(factory::asTriple);
     }
 
     @Override
     public Stream<? extends Triple> stream(final BlankNodeOrIRI s, final IRI p, final RDFTerm o) {
-        JenaRDF factory = new JenaRDF(salt);
+        final JenaRDF factory = new JenaRDF(salt);
         return Iter.asStream(graph.find(toJenaAny(s), toJenaAny(p), toJenaAny(o)), true).map(factory::asTriple);
     }
 
@@ -135,7 +135,7 @@ class JenaGraphImpl implements JenaGraph {
 
     @Override
     public String toString() {
-        StringWriter sw = new StringWriter();
+        final StringWriter sw = new StringWriter();
         RDFDataMgr.write(sw, graph, Lang.NT);
         return sw.toString();
     }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaIRIImpl.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaIRIImpl.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaIRIImpl.java
index 36f8880..77de68a 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaIRIImpl.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaIRIImpl.java
@@ -48,7 +48,7 @@ class JenaIRIImpl extends AbstractJenaRDFTerm implements JenaIRI {
         if (!(other instanceof IRI)) {
             return false;
         }
-        IRI iri = (IRI) other;
+        final IRI iri = (IRI) other;
         return getIRIString().equals(iri.getIRIString());
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaLiteralImpl.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaLiteralImpl.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaLiteralImpl.java
index 637c51f..faee060 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaLiteralImpl.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaLiteralImpl.java
@@ -49,7 +49,7 @@ class JenaLiteralImpl extends AbstractJenaRDFTerm implements JenaLiteral {
         if (!(other instanceof Literal)) {
             return false;
         }
-        Literal literal = (Literal) other;
+        final Literal literal = (Literal) other;
         return getLexicalForm().equals(literal.getLexicalForm()) && getLanguageTag().equals(literal.getLanguageTag())
                 && getDatatype().equals(literal.getDatatype());
     }
@@ -61,7 +61,7 @@ class JenaLiteralImpl extends AbstractJenaRDFTerm implements JenaLiteral {
 
     @Override
     public Optional<String> getLanguageTag() {
-        String x = asJenaNode().getLiteralLanguage();
+        final String x = asJenaNode().getLiteralLanguage();
         if (x == null || x.isEmpty()) {
             return Optional.empty();
         }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaQuadImpl.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaQuadImpl.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaQuadImpl.java
index 491b80d..4bdbf77 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaQuadImpl.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaQuadImpl.java
@@ -53,7 +53,7 @@ class JenaQuadImpl extends AbstractQuadLike<BlankNodeOrIRI, IRI, RDFTerm, BlankN
         if (!(other instanceof Quad)) {
             return false;
         }
-        Quad quad = (Quad) other;
+        final Quad quad = (Quad) other;
         return getGraphName().equals(quad.getGraphName()) && getSubject().equals(quad.getSubject())
                 && getPredicate().equals(quad.getPredicate()) && getObject().equals(quad.getObject());
     }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaTripleImpl.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaTripleImpl.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaTripleImpl.java
index b18c3d0..cc268d5 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaTripleImpl.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaTripleImpl.java
@@ -53,7 +53,7 @@ class JenaTripleImpl extends AbstractQuadLike<BlankNodeOrIRI, IRI, RDFTerm, RDFT
         if (!(other instanceof Triple)) {
             return false;
         }
-        Triple triple = (Triple) other;
+        final Triple triple = (Triple) other;
         return getSubject().equals(triple.getSubject()) && getPredicate().equals(triple.getPredicate())
                 && getObject().equals(triple.getObject());
     }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/test/java/org/apache/commons/rdf/jena/JenaServiceLoaderTest.java
----------------------------------------------------------------------
diff --git a/jena/src/test/java/org/apache/commons/rdf/jena/JenaServiceLoaderTest.java b/jena/src/test/java/org/apache/commons/rdf/jena/JenaServiceLoaderTest.java
index dc0c8bd..ed99876 100644
--- a/jena/src/test/java/org/apache/commons/rdf/jena/JenaServiceLoaderTest.java
+++ b/jena/src/test/java/org/apache/commons/rdf/jena/JenaServiceLoaderTest.java
@@ -29,8 +29,8 @@ public class JenaServiceLoaderTest {
 
     @Test
     public void testServiceLoaderLookup() {
-        ServiceLoader<RDF> loader = ServiceLoader.load(RDF.class);
-        for (RDF impl : loader) {
+        final ServiceLoader<RDF> loader = ServiceLoader.load(RDF.class);
+        for (final RDF impl : loader) {
             if (impl instanceof JenaRDF) {
                 return; // yay
             }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/test/java/org/apache/commons/rdf/jena/TestJenaGraphToCommonsRDFGraph.java
----------------------------------------------------------------------
diff --git a/jena/src/test/java/org/apache/commons/rdf/jena/TestJenaGraphToCommonsRDFGraph.java b/jena/src/test/java/org/apache/commons/rdf/jena/TestJenaGraphToCommonsRDFGraph.java
index 632cce9..00e01e0 100644
--- a/jena/src/test/java/org/apache/commons/rdf/jena/TestJenaGraphToCommonsRDFGraph.java
+++ b/jena/src/test/java/org/apache/commons/rdf/jena/TestJenaGraphToCommonsRDFGraph.java
@@ -59,35 +59,35 @@ public class TestJenaGraphToCommonsRDFGraph {
 
     @Test
     public void jenaToCommonsRDF() throws Exception {
-        org.apache.jena.graph.Graph jGraph = GraphFactory.createGraphMem();
+        final org.apache.jena.graph.Graph jGraph = GraphFactory.createGraphMem();
         RDFDataMgr.read(jGraph, turtleFile.toUri().toString());
 
-        JenaRDF factory = new JenaRDF();
+        final JenaRDF factory = new JenaRDF();
 
         // "graph" is a CommonsRDF graph
-        Graph graph = factory.asGraph(jGraph);
+        final Graph graph = factory.asGraph(jGraph);
 
         // The below check expected statements from D.ttl
 
-        JenaIRI p = factory.createIRI("http://example.com/p");
-        JenaIRI s = factory.createIRI("http://example.com/s");
-        JenaLiteral literal123 = factory.createLiteral("123", Types.XSD_INTEGER);
+        final JenaIRI p = factory.createIRI("http://example.com/p");
+        final JenaIRI s = factory.createIRI("http://example.com/s");
+        final JenaLiteral literal123 = factory.createLiteral("123", Types.XSD_INTEGER);
         assertTrue(graph.contains(s, p, literal123));
 
-        JenaIRI p1 = factory.createIRI("http://example.com/p1");
+        final JenaIRI p1 = factory.createIRI("http://example.com/p1");
         // Let's look up the BlankNode
-        BlankNodeOrIRI bnode1 = graph.stream(null, p1, null).findFirst().map(Triple::getSubject).get();
+        final BlankNodeOrIRI bnode1 = graph.stream(null, p1, null).findFirst().map(Triple::getSubject).get();
         assertTrue(bnode1 instanceof BlankNode);
 
         // Verify we can use BlankNode in query again
-        RDFTerm obj = graph.stream(bnode1, p1, null).findFirst().map(Triple::getObject).get();
+        final RDFTerm obj = graph.stream(bnode1, p1, null).findFirst().map(Triple::getObject).get();
 
         // Let's look up also that nested blank node
         assertTrue(obj instanceof BlankNode);
-        BlankNode bnode2 = (BlankNode) obj;
+        final BlankNode bnode2 = (BlankNode) obj;
 
-        JenaIRI q = factory.createIRI("http://example.com/q");
-        JenaLiteral literalR = factory.createLiteral("r", "en");
+        final JenaIRI q = factory.createIRI("http://example.com/q");
+        final JenaLiteral literalR = factory.createLiteral("r", "en");
         assertTrue(graph.contains(bnode2, q, literalR));
 
         // Can we add the same triple again as s/p/o
@@ -102,9 +102,9 @@ public class TestJenaGraphToCommonsRDFGraph {
         assertEquals(3, graph.size());
 
         // Add to CommonsRDF Graph
-        JenaIRI s2 = factory.createIRI("http://example/s2");
-        JenaIRI p2 = factory.createIRI("http://example/p2");
-        JenaLiteral foo = factory.createLiteral("foo");
+        final JenaIRI s2 = factory.createIRI("http://example/s2");
+        final JenaIRI p2 = factory.createIRI("http://example/p2");
+        final JenaLiteral foo = factory.createLiteral("foo");
         graph.add(s2, p2, foo);
         assertEquals(4, graph.size());
         assertTrue(graph.contains(s2, p2, foo));

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jena/src/test/java/org/apache/commons/rdf/jena/TestRDFParserBuilder.java
----------------------------------------------------------------------
diff --git a/jena/src/test/java/org/apache/commons/rdf/jena/TestRDFParserBuilder.java b/jena/src/test/java/org/apache/commons/rdf/jena/TestRDFParserBuilder.java
index da60602..c1bf41e 100644
--- a/jena/src/test/java/org/apache/commons/rdf/jena/TestRDFParserBuilder.java
+++ b/jena/src/test/java/org/apache/commons/rdf/jena/TestRDFParserBuilder.java
@@ -54,8 +54,8 @@ public class TestRDFParserBuilder {
 
     @Test
     public void parseTurtle() throws Exception {
-        Graph g = new JenaRDF().createGraph();
-        Future<ParseResult> gFuture = new JenaRDFParser().contentType(RDFSyntax.TURTLE).source(turtleFile).target(g)
+        final Graph g = new JenaRDF().createGraph();
+        final Future<ParseResult> gFuture = new JenaRDFParser().contentType(RDFSyntax.TURTLE).source(turtleFile).target(g)
                 .parse();
         gFuture.get(5, TimeUnit.SECONDS);
         assertEquals(3, g.size());

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
index a9b13e2..c508e6b 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java
@@ -51,7 +51,7 @@ final class JsonLdBlankNodeImpl extends JsonLdTermImpl implements JsonLdBlankNod
         if (!(obj instanceof BlankNode)) {
             return false;
         }
-        BlankNode other = (BlankNode) obj;
+        final BlankNode other = (BlankNode) obj;
         return uniqueReference().equals(other.uniqueReference());
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/56ddbdcf/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
index fe91536..d4addfb 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
@@ -95,7 +95,7 @@ class JsonLdGraphImpl extends AbstractJsonLdGraphLike<Triple> implements JsonLdG
 
     @Override
     public long size() {
-        String g = graphName.map(factory::asJsonLdString).orElse("@default");
+        final String g = graphName.map(factory::asJsonLdString).orElse("@default");
         return Optional.ofNullable(rdfDataSet.getQuads(g)).map(List::size).orElse(0);
     }
 


Mime
View raw message