X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-clustering-commons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fnode%2Futils%2FQNameFactory.java;h=c63266ff08e218fc6180fdf1cae61e990677eace;hb=bfd413d87f82ee3ffed67a141a980805950a0f06;hp=5a8f5228619e9f80a091da123aa734fb59dcd85f;hpb=20d3e2621112fe4bf77b888d57dbdc69f2105d82;p=controller.git 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); } }