X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-clustering-commons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fnode%2Futils%2FQNameFactory.java;h=c63266ff08e218fc6180fdf1cae61e990677eace;hp=5a8f5228619e9f80a091da123aa734fb59dcd85f;hb=48904394c82c33384d9da9f0bf233ca950a832fb;hpb=49107f3cdc5a075862417e1fd9ca72198c7582fe diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/QNameFactory.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/QNameFactory.java index 5a8f522861..c63266ff08 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/QNameFactory.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/QNameFactory.java @@ -19,11 +19,12 @@ public class QNameFactory { private static final int MAX_QNAME_CACHE_SIZE = 10000; - private static LoadingCache cache = CacheBuilder.newBuilder() + private static final LoadingCache CACHE = CacheBuilder.newBuilder() .maximumSize(MAX_QNAME_CACHE_SIZE) .softValues() .build( new CacheLoader() { + @Override public QName load(String key) { return QName.create(key); } @@ -32,6 +33,6 @@ public class QNameFactory { public static QName create(String name){ - return cache.getUnchecked(name); + return CACHE.getUnchecked(name); } }