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=4d26f741065a10e429c295cf73bf3f37a7d9c17b;hb=701434f9470989a532b735a361ecbe8e4a5e1b36;hp=5a8f5228619e9f80a091da123aa734fb59dcd85f;hpb=3a8636987a20a584ad25af7aba11ffcade21ebe3;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..4d26f74106 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 @@ -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 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 +31,6 @@ public class QNameFactory { public static QName create(String name){ - return cache.getUnchecked(name); + return CACHE.getUnchecked(name); } }