Repository: ant
Updated Branches:
  refs/heads/master 03bb68d6b -> bc5836f68


Synchronized fields ought to be final

Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/bc5836f6
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/bc5836f6
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/bc5836f6

Branch: refs/heads/master
Commit: bc5836f688e57d6ac08dda88ad4a693db30d678b
Parents: 03bb68d
Author: Gintas Grigelionis <gin...@apache.org>
Authored: Sat Apr 28 11:06:42 2018 +0200
Committer: Gintas Grigelionis <gin...@apache.org>
Committed: Sat Apr 28 11:06:42 2018 +0200

----------------------------------------------------------------------
 src/main/org/apache/tools/ant/ComponentHelper.java           | 2 +-
 src/main/org/apache/tools/ant/PropertyHelper.java            | 6 +++---
 src/main/org/apache/tools/ant/taskdefs/JDBCTask.java         | 2 +-
 src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/bc5836f6/src/main/org/apache/tools/ant/ComponentHelper.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/ComponentHelper.java 
b/src/main/org/apache/tools/ant/ComponentHelper.java
index d80ede6..04b048a 100644
--- a/src/main/org/apache/tools/ant/ComponentHelper.java
+++ b/src/main/org/apache/tools/ant/ComponentHelper.java
@@ -60,7 +60,7 @@ import org.apache.tools.ant.util.FileUtils;
  */
 public class ComponentHelper  {
     /** Map of component name to lists of restricted definitions */
-    private Map<String, List<AntTypeDefinition>> restrictedDefinitions = new 
HashMap<>();
+    private final Map<String, List<AntTypeDefinition>> restrictedDefinitions = 
new HashMap<>();
 
     /** Map from component name to anttypedefinition */
     private final Hashtable<String, AntTypeDefinition> antTypeTable = new 
Hashtable<>();

http://git-wip-us.apache.org/repos/asf/ant/blob/bc5836f6/src/main/org/apache/tools/ant/PropertyHelper.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/PropertyHelper.java 
b/src/main/org/apache/tools/ant/PropertyHelper.java
index dcda2ec..fdd4376 100644
--- a/src/main/org/apache/tools/ant/PropertyHelper.java
+++ b/src/main/org/apache/tools/ant/PropertyHelper.java
@@ -238,21 +238,21 @@ public class PropertyHelper implements GetProperty {
     private final Hashtable<Class<? extends Delegate>, List<Delegate>> 
delegates = new Hashtable<>();
 
     /** Project properties map (usually String to String). */
-    private Hashtable<String, Object> properties = new Hashtable<>();
+    private final Hashtable<String, Object> properties = new Hashtable<>();
 
     /**
      * Map of "user" properties (as created in the Ant task, for example).
      * Note that these key/value pairs are also always put into the
      * project properties, so only the project properties need to be queried.
      */
-    private Hashtable<String, Object> userProperties = new Hashtable<>();
+    private final Hashtable<String, Object> userProperties = new Hashtable<>();
 
     /**
      * Map of inherited "user" properties - that are those "user"
      * properties that have been created by tasks and not been set
      * from the command line or a GUI tool.
      */
-    private Hashtable<String, Object> inheritedProperties = new Hashtable<>();
+    private final Hashtable<String, Object> inheritedProperties = new 
Hashtable<>();
 
     /**
      * Default constructor.

http://git-wip-us.apache.org/repos/asf/ant/blob/bc5836f6/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java 
b/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java
index fdfdc39..aa8f1fb 100644
--- a/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java
@@ -97,7 +97,7 @@ public abstract class JDBCTask extends Task {
      * getting an OutOfMemoryError when calling this task
      * multiple times in a row.
      */
-    private static Hashtable<String, AntClassLoader> LOADER_MAP = new 
Hashtable<>(HASH_TABLE_SIZE);
+    private static final Hashtable<String, AntClassLoader> LOADER_MAP = new 
Hashtable<>(HASH_TABLE_SIZE);
 
     private boolean caching = true;
 

http://git-wip-us.apache.org/repos/asf/ant/blob/bc5836f6/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java 
b/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java
index acc69a0..6ab8a0a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java
+++ b/src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java
@@ -31,7 +31,7 @@ import java.util.Set;
 class ProcessDestroyer implements Runnable {
     private static final int THREAD_DIE_TIMEOUT = 20000;
 
-    private Set<Process> processes = new HashSet<>();
+    private final Set<Process> processes = new HashSet<>();
     // methods to register and unregister shutdown hooks
     private Method addShutdownHookMethod;
     private Method removeShutdownHookMethod;

Reply via email to