Fix CS warnings in sal-clustering-commons and enable enforcement
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / datastore / node / utils / QNameFactory.java
index 5a8f5228619e9f80a091da123aa734fb59dcd85f..7d5379dfe0ce87d2fbd70e6b38a3fd7d432bdba6 100644 (file)
@@ -1,11 +1,9 @@
 /*
+ * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others.  All rights reserved.
  *
- *  Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- *  This program and the accompanying materials are made available under the
- *  terms of the Eclipse Public License v1.0 which accompanies this distribution,
- *  and is available at http://www.eclipse.org/legal/epl-v10.html
- *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
 package org.opendaylight.controller.cluster.datastore.node.utils;
@@ -19,11 +17,12 @@ public class QNameFactory {
 
     private static final int MAX_QNAME_CACHE_SIZE = 10000;
 
-    private static LoadingCache<String, QName> cache = CacheBuilder.newBuilder()
+    private static final LoadingCache<String, QName> CACHE = CacheBuilder.newBuilder()
         .maximumSize(MAX_QNAME_CACHE_SIZE)
         .softValues()
         .build(
             new CacheLoader<String, QName>() {
+                @Override
                 public QName load(String key) {
                     return QName.create(key);
                 }
@@ -31,7 +30,7 @@ public class QNameFactory {
         );
 
 
-    public static QName create(String name){
-        return cache.getUnchecked(name);
+    public static QName create(String name) {
+        return CACHE.getUnchecked(name);
     }
 }