commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [14/50] [abbrv] commons-rdf git commit: Add final modifier to private fields.
Date Thu, 12 Jan 2017 17:36:02 GMT
Add final modifier to private fields.

Project: http://git-wip-us.apache.org/repos/asf/commons-rdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rdf/commit/4e26ac89
Tree: http://git-wip-us.apache.org/repos/asf/commons-rdf/tree/4e26ac89
Diff: http://git-wip-us.apache.org/repos/asf/commons-rdf/diff/4e26ac89

Branch: refs/heads/COMMONSRDF-47
Commit: 4e26ac89de111ff133175f8ae4f636d17027de16
Parents: f8c328b
Author: Gary Gregory <ggregory@apache.org>
Authored: Fri Nov 11 14:47:39 2016 -0800
Committer: Gary Gregory <ggregory@apache.org>
Committed: Fri Nov 11 14:47:39 2016 -0800

----------------------------------------------------------------------
 .../org/apache/commons/rdf/integrationtests/AllToAllTest.java  | 4 ++--
 .../org/apache/commons/rdf/jena/impl/AbstractJenaRDFTerm.java  | 2 +-
 .../org/apache/commons/rdf/jena/impl/JenaBlankNodeImpl.java    | 2 +-
 .../java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java | 6 +++---
 .../org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.java     | 2 +-
 .../java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java | 2 +-
 .../java/org/apache/commons/rdf/rdf4j/impl/BlankNodeImpl.java  | 4 ++--
 .../org/apache/commons/rdf/rdf4j/impl/ConvertedStatements.java | 6 +++---
 .../java/org/apache/commons/rdf/rdf4j/impl/ModelGraphImpl.java | 4 ++--
 .../main/java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java  | 2 +-
 .../java/org/apache/commons/rdf/rdf4j/impl/TripleImpl.java     | 2 +-
 .../org/apache/commons/rdf/simple/SimpleRDFTermFactory.java    | 2 +-
 .../commons/rdf/simple/experimental/RDFParseException.java     | 2 +-
 .../commons/rdf/simple/experimental/AbstractRDFParserTest.java | 4 ++--
 14 files changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/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 5589bd7..080e5b2 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
@@ -44,8 +44,8 @@ import org.junit.runners.Parameterized.Parameters;
 @RunWith(Parameterized.class)
 public class AllToAllTest {
 
-    private RDF nodeFactory;
-    private RDF graphFactory;
+    private final RDF nodeFactory;
+    private final RDF graphFactory;
 
     public AllToAllTest(Class<? extends RDF> from, Class<? extends RDF> to)
             throws InstantiationException, IllegalAccessException {

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/jena/src/main/java/org/apache/commons/rdf/jena/impl/AbstractJenaRDFTerm.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/AbstractJenaRDFTerm.java
b/jena/src/main/java/org/apache/commons/rdf/jena/impl/AbstractJenaRDFTerm.java
index cd370f8..bc22a67 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/AbstractJenaRDFTerm.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/AbstractJenaRDFTerm.java
@@ -24,7 +24,7 @@ import org.apache.jena.graph.Node;
 import org.apache.jena.riot.out.NodeFmtLib;
 
 class AbstractJenaRDFTerm implements JenaRDFTerm, RDFTerm {
-    private Node node;
+    private final Node node;
     // static private PrefixMapping empty = new PrefixMappingImpl();
 
     protected AbstractJenaRDFTerm(Node node) {

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/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 08a5880..46a65fe 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
@@ -26,7 +26,7 @@ import org.apache.jena.graph.Node;
 
 class JenaBlankNodeImpl extends AbstractJenaRDFTerm implements JenaBlankNode {
 
-    private UUID salt;
+    private final UUID salt;
 
     JenaBlankNodeImpl(Node node, UUID salt) {
         super(node);

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/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 1b4edb9..f8103cd 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
@@ -43,9 +43,9 @@ import org.apache.jena.sparql.core.GraphView;
 
 class JenaDatasetImpl implements JenaDataset {
 
-    private DatasetGraph graph;
-    private UUID salt;
-    private JenaRDF factory;
+    private final DatasetGraph graph;
+    private final UUID salt;
+    private final JenaRDF factory;
 
     JenaDatasetImpl(DatasetGraph graph, UUID salt) {
         this.graph = graph;

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/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 66c8cba..c626df2 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
@@ -25,7 +25,7 @@ public interface JsonLdBlankNode extends JsonLdTerm, BlankNode {
 }
 
 final class JsonLdBlankNodeImpl extends JsonLdTermImpl implements JsonLdBlankNode {
-    private String blankNodePrefix;
+    private final String blankNodePrefix;
 
     JsonLdBlankNodeImpl(Node node, String blankNodePrefix) {
         super(node);

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
index 3a55fdb..116873e 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdQuadLike.java
@@ -36,7 +36,7 @@ class JsonLdQuadLikeImpl<S extends RDFTerm, P extends RDFTerm, O extends
RDFTerm
     private static JsonLdRDF rdfTermFactory = new JsonLdRDF();
 
     private final Quad quad;
-    private String blankNodePrefix;
+    private final String blankNodePrefix;
 
     JsonLdQuadLikeImpl(Quad jsonldQuad, String blankNodePrefix) {
         this.quad = jsonldQuad;

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/BlankNodeImpl.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/BlankNodeImpl.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/BlankNodeImpl.java
index c14697c..181a763 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/BlankNodeImpl.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/BlankNodeImpl.java
@@ -28,8 +28,8 @@ import org.eclipse.rdf4j.rio.turtle.TurtleUtil;
 final class BlankNodeImpl extends AbstractRDFTerm<BNode> implements RDF4JBlankNode
{
 
     private transient int hashCode = 0;
-    private long saltUUIDleast;
-    private long saltUUIDmost;
+    private final long saltUUIDleast;
+    private final long saltUUIDmost;
 
     BlankNodeImpl(BNode bNode, UUID salt) {
         super(bNode);

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ConvertedStatements.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ConvertedStatements.java
b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ConvertedStatements.java
index f199b8f..f1089d7 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ConvertedStatements.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ConvertedStatements.java
@@ -30,9 +30,9 @@ import org.eclipse.rdf4j.repository.RepositoryResult;
 
 final class ConvertedStatements<T> implements ClosableIterable<T> {
 
-    private RepositoryConnection conn;
-    private RepositoryResult<Statement> results;
-    private Function<Statement, T> statementAdapter;
+    private final RepositoryConnection conn;
+    private final RepositoryResult<Statement> results;
+    private final Function<Statement, T> statementAdapter;
 
     ConvertedStatements(Supplier<RepositoryConnection> repositoryConnector, Function<Statement,
T> statementAdapter,
             Resource subj, org.eclipse.rdf4j.model.IRI pred, Value obj, Resource... contexts)
{

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ModelGraphImpl.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ModelGraphImpl.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ModelGraphImpl.java
index d9ea22a..ad1ed69 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ModelGraphImpl.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ModelGraphImpl.java
@@ -39,8 +39,8 @@ import org.eclipse.rdf4j.repository.Repository;
 
 final class ModelGraphImpl implements RDF4JGraph {
 
-    private Model model;
-    private RDF4J rdf4jTermFactory;
+    private final Model model;
+    private final RDF4J rdf4jTermFactory;
 
     ModelGraphImpl(Model model, RDF4J rdf4jTermFactory) {
         this.model = model;

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java
index 228b4f0..5dc36c4 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java
@@ -31,7 +31,7 @@ import org.eclipse.rdf4j.model.Statement;
 
 final class QuadImpl implements Quad, RDF4JQuad {
     private transient int hashCode = 0;
-    private UUID salt;
+    private final UUID salt;
     private final Statement statement;
 
     QuadImpl(Statement statement, UUID salt) {

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/TripleImpl.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/TripleImpl.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/TripleImpl.java
index 4ed3946..64ed327 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/TripleImpl.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/TripleImpl.java
@@ -28,7 +28,7 @@ import org.apache.commons.rdf.rdf4j.RDF4JTriple;
 import org.eclipse.rdf4j.model.Statement;
 
 final class TripleImpl implements Triple, RDF4JTriple {
-    private UUID salt;
+    private final UUID salt;
     private final Statement statement;
 
     TripleImpl(Statement statement, UUID salt) {

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
b/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
index c526b46..f5c476b 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java
@@ -34,7 +34,7 @@ import org.apache.commons.rdf.api.Triple;
 @Deprecated
 public class SimpleRDFTermFactory implements RDFTermFactory {
 
-    private SimpleRDF factory = new SimpleRDF();
+    private final SimpleRDF factory = new SimpleRDF();
 
     @Override
     public BlankNode createBlankNode() {

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/simple/src/main/java/org/apache/commons/rdf/simple/experimental/RDFParseException.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/experimental/RDFParseException.java
b/simple/src/main/java/org/apache/commons/rdf/simple/experimental/RDFParseException.java
index aedab78..c88642b 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/experimental/RDFParseException.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/experimental/RDFParseException.java
@@ -22,7 +22,7 @@ import org.apache.commons.rdf.experimental.RDFParser;
 
 public class RDFParseException extends Exception {
     private static final long serialVersionUID = 5427752643780702976L;
-    private RDFParser builder;
+    private final RDFParser builder;
 
     public RDFParseException(RDFParser builder) {
         super();

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/4e26ac89/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
b/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
index 12e58bd..d3b62b9 100644
--- a/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
+++ b/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
@@ -48,9 +48,9 @@ import org.junit.rules.ExpectedException;
 
 public class AbstractRDFParserTest {
 
-    private RDF factory = new SimpleRDF();
+    private final RDF factory = new SimpleRDF();
 
-    private DummyRDFParserBuilder dummyParser = new DummyRDFParserBuilder();
+    private final DummyRDFParserBuilder dummyParser = new DummyRDFParserBuilder();
     private Path testNt;
     private Path testTtl;
     private Path testXml;


Mime
View raw message