Make REUSABLE_*_TL final 69/28769/5
authorRobert Varga <rovarga@cisco.com>
Sat, 24 Oct 2015 09:44:30 +0000 (11:44 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 27 Oct 2015 19:19:39 +0000 (19:19 +0000)
Since these are public static fields, they should be final to prevent
possible shenanigans.

Change-Id: I4a360e060ddde57a73118bcf3d053ce397204136
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/SerializationUtils.java

index bf9f8d803ac00f0e8ce2cbe983f81bfb9e9a44d0..e96375b3e467c9ee2ef36214d47a8d0c84ff7caa 100644 (file)
@@ -30,8 +30,8 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
  * @author Thomas Pantelis
  */
 public final class SerializationUtils {
  * @author Thomas Pantelis
  */
 public final class SerializationUtils {
-    public static ThreadLocal<NormalizedNodeOutputStreamWriter> REUSABLE_WRITER_TL = new ThreadLocal<>();
-    public static ThreadLocal<NormalizedNodeInputStreamReader> REUSABLE_READER_TL = new ThreadLocal<>();
+    public static final ThreadLocal<NormalizedNodeOutputStreamWriter> REUSABLE_WRITER_TL = new ThreadLocal<>();
+    public static final ThreadLocal<NormalizedNodeInputStreamReader> REUSABLE_READER_TL = new ThreadLocal<>();
 
     public static interface Applier<T> {
         void apply(T instance, YangInstanceIdentifier path, NormalizedNode<?, ?> node);
 
     public static interface Applier<T> {
         void apply(T instance, YangInstanceIdentifier path, NormalizedNode<?, ?> node);