Remove deprecated Qname.cachedReference method 69/32069/2
authorClaudio D. Gasparini <cgaspari@cisco.com>
Mon, 4 Jan 2016 10:48:06 +0000 (11:48 +0100)
committerClaudio D. Gasparini <cgaspari@cisco.com>
Mon, 4 Jan 2016 10:49:44 +0000 (11:49 +0100)
Remove deprecated Qname.cachedReference method

Change-Id: I401b75a2a583b9fd048dba6ac7698dd84c47f915
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
29 files changed:
bgp/bmp-impl/src/main/java/org/opendaylight/protocol/bmp/impl/app/BmpMonitoringStationImpl.java
bgp/bmp-impl/src/main/java/org/opendaylight/protocol/bmp/impl/app/BmpRouterImpl.java
bgp/bmp-impl/src/main/java/org/opendaylight/protocol/bmp/impl/app/BmpRouterPeerImpl.java
bgp/bmp-impl/src/main/java/org/opendaylight/protocol/bmp/impl/app/TablesUtil.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/AbstractFSNlriParser.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/AbstractFlowspecRIBSupport.java
bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/LabeledUnicastRIBSupport.java
bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/LinkstateRIBSupport.java
bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/nlri/LinkNlriParser.java
bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/nlri/LinkstateNlriParser.java
bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/nlri/NodeNlriParser.java
bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/nlri/PrefixNlriParser.java
bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/nlri/TeLspNlriParser.java
bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/spi/TlvUtil.java
bgp/rib-impl/src/main/java/org/opendaylight/controller/config/yang/bgp/rib/impl/BGPApplicationPeerModule.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AbstractPeerRoleTracker.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AdjRibInWriter.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AdjRibOutListener.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AttributeOperations.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BestPathState.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/IPv4RIBSupport.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/IPv6RIBSupport.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/IdentifierUtils.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/RIBImpl.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/AttributeOperationsTest.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/ExportPolicyTest.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/FromExternalImportPolicyTest.java
bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/AbstractRIBSupport.java
bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/RibSupportUtils.java

index 2bfeef1d6cb72627f26c1373bd44762344b0326f..5582e9e9713ca9906c4dd27477fa53f9e4d6e561 100644 (file)
@@ -49,7 +49,7 @@ public final class BmpMonitoringStationImpl implements BmpMonitoringStation {
 
     private static final Logger LOG = LoggerFactory.getLogger(BmpMonitoringStationImpl.class);
 
-    private static final QName MONITOR_ID_QNAME = QName.cachedReference(QName.create(Monitor.QNAME, "monitor-id"));
+    private static final QName MONITOR_ID_QNAME = QName.create(Monitor.QNAME, "monitor-id").intern();
 
     private final DOMDataBroker domDataBroker;
     private final YangInstanceIdentifier yangMonitorId;
index c5f5bd76fe28616959a564ba75fc6bcf74f27212..b97a970c26db7663c22f1194b09a898cdb95a388 100644 (file)
@@ -53,11 +53,11 @@ public class BmpRouterImpl implements BmpRouter, TransactionChainListener {
 
     private static final Logger LOG = LoggerFactory.getLogger(BmpRouterImpl.class);
 
-    private static final QName ROUTER_ID_QNAME = QName.cachedReference(QName.create(Router.QNAME, "router-id"));
-    private static final QName ROUTER_STATUS_QNAME = QName.cachedReference(QName.create(Router.QNAME, "status"));
-    private static final QName ROUTER_NAME_QNAME = QName.cachedReference(QName.create(Router.QNAME, "name"));
-    private static final QName ROUTER_DESCRIPTION_QNAME = QName.cachedReference(QName.create(Router.QNAME, "description"));
-    private static final QName ROUTER_INFO_QNAME = QName.cachedReference(QName.create(Router.QNAME, "info"));
+    private static final QName ROUTER_ID_QNAME = QName.create(Router.QNAME, "router-id").intern();
+    private static final QName ROUTER_STATUS_QNAME = QName.create(Router.QNAME, "status").intern();
+    private static final QName ROUTER_NAME_QNAME = QName.create(Router.QNAME, "name").intern();
+    private static final QName ROUTER_DESCRIPTION_QNAME = QName.create(Router.QNAME, "description").intern();
+    private static final QName ROUTER_INFO_QNAME = QName.create(Router.QNAME, "info").intern();
     private static final String UP = "up";
     private static final String DOWN = "down";
 
index bce8a50a43828ce5071e479bc1412b23d9fee583..e89e0ff02f230ae5c4c12c2d5d260dee6af8ca9b 100644 (file)
@@ -71,36 +71,36 @@ public final class BmpRouterPeerImpl implements BmpRouterPeer {
 
     private static final String TIMESTAMP_SEC = "timestamp-sec";
 
-    private static final QName PEER_ID_QNAME = QName.cachedReference(QName.create(Peer.QNAME, "peer-id"));
-    private static final QName PEER_TYPE_QNAME = QName.cachedReference(QName.create(Peer.QNAME, "type"));
-    private static final QName PEER_ADDRESS_QNAME = QName.cachedReference(QName.create(Peer.QNAME, "address"));
-    private static final QName PEER_AS_QNAME = QName.cachedReference(QName.create(Peer.QNAME, "as"));
-    private static final QName PEER_BGP_ID_QNAME = QName.cachedReference(QName.create(Peer.QNAME, "bgp-id"));
-    private static final QName PEER_DISTINGUISHER_QNAME = QName.cachedReference(QName.create(Peer.QNAME, "router-distinguisher"));
-    private static final QName PEER_LOCAL_ADDRESS_QNAME = QName.cachedReference(QName.create(PeerSession.QNAME, "local-address"));
-    private static final QName PEER_LOCAL_PORT_QNAME = QName.cachedReference(QName.create(PeerSession.QNAME, "local-port"));
-    private static final QName PEER_REMOTE_PORT_QNAME = QName.cachedReference(QName.create(PeerSession.QNAME, "remote-port"));
-    private static final QName PEER_STATUS_QNAME = QName.cachedReference(QName.create(PeerSession.QNAME, "status"));
-    private static final QName PEER_UP_TIMESTAMP_QNAME = QName.cachedReference(QName.create(PeerSession.QNAME, TIMESTAMP_SEC));
-    private static final QName PEER_STATS_TIMESTAMP_QNAME = QName.cachedReference(QName.create(Stats.QNAME, TIMESTAMP_SEC));
-    private static final QName PEER_MIRROR_INFORMATION_QNAME = QName.cachedReference(QName.create(Mirrors.QNAME, "information"));
-    private static final QName PEER_MIRROR_TIMESTAMP_QNAME = QName.cachedReference(QName.create(Mirrors.QNAME, TIMESTAMP_SEC));
+    private static final QName PEER_ID_QNAME = QName.create(Peer.QNAME, "peer-id").intern();
+    private static final QName PEER_TYPE_QNAME = QName.create(Peer.QNAME, "type");
+    private static final QName PEER_ADDRESS_QNAME = QName.create(Peer.QNAME, "address").intern();
+    private static final QName PEER_AS_QNAME = QName.create(Peer.QNAME, "as").intern();
+    private static final QName PEER_BGP_ID_QNAME = QName.create(Peer.QNAME, "bgp-id").intern();
+    private static final QName PEER_DISTINGUISHER_QNAME = QName.create(Peer.QNAME, "router-distinguisher").intern();
+    private static final QName PEER_LOCAL_ADDRESS_QNAME = QName.create(PeerSession.QNAME, "local-address").intern();
+    private static final QName PEER_LOCAL_PORT_QNAME = QName.create(PeerSession.QNAME, "local-port").intern();
+    private static final QName PEER_REMOTE_PORT_QNAME = QName.create(PeerSession.QNAME, "remote-port").intern();
+    private static final QName PEER_STATUS_QNAME = QName.create(PeerSession.QNAME, "status").intern();
+    private static final QName PEER_UP_TIMESTAMP_QNAME = QName.create(PeerSession.QNAME, TIMESTAMP_SEC).intern();
+    private static final QName PEER_STATS_TIMESTAMP_QNAME = QName.create(Stats.QNAME, TIMESTAMP_SEC).intern();
+    private static final QName PEER_MIRROR_INFORMATION_QNAME = QName.create(Mirrors.QNAME, "information").intern();
+    private static final QName PEER_MIRROR_TIMESTAMP_QNAME = QName.create(Mirrors.QNAME, TIMESTAMP_SEC).intern();
 
-    private static final QName STAT0_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "rejected-prefixes"));
-    private static final QName STAT1_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "duplicate-prefix-advertisements"));
-    private static final QName STAT2_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "duplicate-withdraws"));
-    private static final QName STAT3_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "invalidated-cluster-list-loop"));
-    private static final QName STAT4_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "invalidated-as-path-loop"));
-    private static final QName STAT5_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "invalidated-originator-id"));
-    private static final QName STAT6_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "invalidated-as-confed-loop"));
-    private static final QName STAT7_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "adj-ribs-in-routes"));
-    private static final QName STAT8_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "loc-rib-routes"));
-    private static final QName STAT9_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "per-afi-safi-adj-rib-in-routes"));
-    private static final QName AF_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "afi-safi"));
-    private static final QName COUNT_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "count"));
-    private static final QName STAT10_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "per-afi-safi-loc-rib-routes"));
-    private static final QName STAT11_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "updates-treated-as-withdraw"));
-    private static final QName STAT13_QNAME = QName.cachedReference(QName.create(Stats.QNAME, "duplicate-updates"));
+    private static final QName STAT0_QNAME = QName.create(Stats.QNAME, "rejected-prefixes").intern();
+    private static final QName STAT1_QNAME = QName.create(Stats.QNAME, "duplicate-prefix-advertisements").intern();
+    private static final QName STAT2_QNAME = QName.create(Stats.QNAME, "duplicate-withdraws").intern();
+    private static final QName STAT3_QNAME = QName.create(Stats.QNAME, "invalidated-cluster-list-loop").intern();
+    private static final QName STAT4_QNAME = QName.create(Stats.QNAME, "invalidated-as-path-loop").intern();
+    private static final QName STAT5_QNAME = QName.create(Stats.QNAME, "invalidated-originator-id").intern();
+    private static final QName STAT6_QNAME = QName.create(Stats.QNAME, "invalidated-as-confed-loop").intern();
+    private static final QName STAT7_QNAME = QName.create(Stats.QNAME, "adj-ribs-in-routes");
+    private static final QName STAT8_QNAME = QName.create(Stats.QNAME, "loc-rib-routes");
+    private static final QName STAT9_QNAME = QName.create(Stats.QNAME, "per-afi-safi-adj-rib-in-routes").intern();
+    private static final QName AF_QNAME = QName.create(Stats.QNAME, "afi-safi").intern();
+    private static final QName COUNT_QNAME = QName.create(Stats.QNAME, "count").intern();
+    private static final QName STAT10_QNAME = QName.create(Stats.QNAME, "per-afi-safi-loc-rib-routes").intern();
+    private static final QName STAT11_QNAME = QName.create(Stats.QNAME, "updates-treated-as-withdraw").intern();
+    private static final QName STAT13_QNAME = QName.create(Stats.QNAME, "duplicate-updates").intern();
 
     private static final InstanceIdentifier<SentOpen> SENT_OPEN_IID = InstanceIdentifier.builder(BmpMonitor.class)
             .child(Monitor.class)
index 8114fef6abbedcbbe403b4cb846e10c057bdf118..6103be9261ffbf68f60f88394fbad85626201bda 100644 (file)
@@ -18,11 +18,11 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdent
 
 public final class TablesUtil {
 
-    public static final QName BMP_TABLES_QNAME = QName.cachedReference(QName.create(BmpMonitor.QNAME.getNamespace(), BmpMonitor.QNAME.getRevision(), "tables"));
-    public static final QName BMP_ATTRIBUTES_QNAME = QName.cachedReference(QName.create(BmpMonitor.QNAME.getNamespace(), BmpMonitor.QNAME.getRevision(), "attributes"));
-    public static final QName BMP_ROUTES_QNAME = QName.cachedReference(QName.create(BmpMonitor.QNAME.getNamespace(), BmpMonitor.QNAME.getRevision(), "routes"));
-    public static final QName BMP_AFI_QNAME = QName.cachedReference(QName.create(BMP_TABLES_QNAME, "afi"));
-    public static final QName BMP_SAFI_QNAME = QName.cachedReference(QName.create(BMP_TABLES_QNAME, "safi"));
+    public static final QName BMP_TABLES_QNAME = QName.create(BmpMonitor.QNAME.getNamespace(), BmpMonitor.QNAME.getRevision(), "tables").intern();
+    public static final QName BMP_ATTRIBUTES_QNAME = QName.create(BmpMonitor.QNAME.getNamespace(), BmpMonitor.QNAME.getRevision(), "attributes").intern();
+    public static final QName BMP_ROUTES_QNAME = QName.create(BmpMonitor.QNAME.getNamespace(), BmpMonitor.QNAME.getRevision(), "routes").intern();
+    public static final QName BMP_AFI_QNAME = QName.create(BMP_TABLES_QNAME, "afi").intern();
+    public static final QName BMP_SAFI_QNAME = QName.create(BMP_TABLES_QNAME, "safi").intern();
 
     private TablesUtil() {
         throw new UnsupportedOperationException("Utility class");
@@ -53,8 +53,8 @@ public final class TablesUtil {
      */
     public static NodeIdentifierWithPredicates toYangTablesKey(final QName nodeName, final Class<? extends AddressFamily> afi,
             final Class<? extends SubsequentAddressFamily> safi) {
-        final QName afiQname = QName.cachedReference(QName.create(nodeName, "afi"));
-        final QName safiQname = QName.cachedReference(QName.create(nodeName, "safi"));
+        final QName afiQname = QName.create(nodeName, "afi").intern();
+        final QName safiQname = QName.create(nodeName, "safi").intern();
         final ImmutableMap<QName, Object> keyValues = ImmutableMap.<QName, Object>of(
                         afiQname, BindingReflections.findQName(afi),
                         safiQname, BindingReflections.findQName(safi));
index a41477e94facbe74611b38caebfbf189a1ad354a..858cc34a44bbb8d7849818fcae07b588d326f399 100644 (file)
@@ -105,9 +105,9 @@ public abstract class AbstractFSNlriParser implements NlriParser, NlriSerializer
     @VisibleForTesting
     protected static final NodeIdentifier FLOWSPEC_TYPE_NID = new NodeIdentifier(FlowspecType.QNAME);
     @VisibleForTesting
-    static final NodeIdentifier DEST_PREFIX_NID = new NodeIdentifier(QName.cachedReference(QName.create(DestinationPrefixCase.QNAME, "destination-prefix")));
+    static final NodeIdentifier DEST_PREFIX_NID = new NodeIdentifier(QName.create(DestinationPrefixCase.QNAME, "destination-prefix").intern());
     @VisibleForTesting
-    static final NodeIdentifier SOURCE_PREFIX_NID = new NodeIdentifier(QName.cachedReference(QName.create(SourcePrefixCase.QNAME, "source-prefix")));
+    static final NodeIdentifier SOURCE_PREFIX_NID = new NodeIdentifier(QName.create(SourcePrefixCase.QNAME, "source-prefix").intern());
     @VisibleForTesting
     static final NodeIdentifier PORTS_NID = new NodeIdentifier(Ports.QNAME);
     @VisibleForTesting
index daecc7a7ba1920b77d6ca23752562c95ec8a7f2a..0cbe7c3d5679e43dd3203d7307d03ebe9e9a28cd 100644 (file)
@@ -73,7 +73,7 @@ public abstract class AbstractFlowspecRIBSupport extends AbstractRIBSupport {
         }
     }
 
-    private static final QName ROUTE_KEY = QName.cachedReference(QName.create(FlowspecRoute.QNAME, "route-key"));
+    private static final QName ROUTE_KEY = QName.create(FlowspecRoute.QNAME, "route-key").intern();
     private static final ApplyRoute DELETE_ROUTE = new DeleteRoute();
     private final ApplyRoute putRoute = new PutRoute();
 
index b0a3e708a3df1832eb815024d9e9c02c4d48030b..47c0a940838d79ac749afd42fab67ccca35b21d7 100644 (file)
@@ -70,11 +70,11 @@ final class LabeledUnicastRIBSupport extends AbstractRIBSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(LabeledUnicastRIBSupport.class);
 
-    private static final NodeIdentifier PREFIX_TYPE_NID = NodeIdentifier.create(QName.cachedReference(QName.create(CLabeledUnicastDestination.QNAME, "prefix")));
+    private static final NodeIdentifier PREFIX_TYPE_NID = NodeIdentifier.create(QName.create(CLabeledUnicastDestination.QNAME, "prefix").intern());
     private static final NodeIdentifier LABEL_STACK_NID = NodeIdentifier.create(LabelStack.QNAME);
     private static final NodeIdentifier LV_NID = NodeIdentifier.create(QName.create(Label.QNAME, "label-value"));
 
-    private static final QName ROUTE_KEY = QName.cachedReference(QName.create(LabeledUnicastRoute.QNAME, "route-key"));
+    private static final QName ROUTE_KEY = QName.create(LabeledUnicastRoute.QNAME, "route-key").intern();
     private static final ApplyRoute DELETE_ROUTE = new DeleteRoute();
 
     private static final ChoiceNode EMPTY_ROUTES = Builders.choiceBuilder()
index a92473de1d73860063bc506013db2ab1f948dae1..5b052c20d3390d559a045f9bfe6e9cdaa588c256 100644 (file)
@@ -90,7 +90,7 @@ final class LinkstateRIBSupport extends AbstractRIBSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(LinkstateRIBSupport.class);
 
-    private static final QName ROUTE_KEY = QName.cachedReference(QName.create(LinkstateRoute.QNAME, "route-key"));
+    private static final QName ROUTE_KEY = QName.create(LinkstateRoute.QNAME, "route-key").intern();
     private static final LinkstateRIBSupport SINGLETON = new LinkstateRIBSupport();
     private static final ApplyRoute DELETE_ROUTE = new DeleteRoute();
 
index c3de05b267acc418104f632f95a9fbaa8609a36e..f40a9e106ea56284e75dd73dd1d23698a22cf5a7 100644 (file)
@@ -43,15 +43,15 @@ public final class LinkNlriParser {
 
     /* Link Descriptor QNames */
     @VisibleForTesting
-    public static final NodeIdentifier IPV4_IFACE_NID = new NodeIdentifier(QName.cachedReference(QName.create(LinkDescriptors.QNAME, "ipv4-interface-address")));
-    private static final NodeIdentifier IPV6_IFACE_NID = new NodeIdentifier(QName.cachedReference(QName.create(LinkDescriptors.QNAME, "ipv6-interface-address")));
+    public static final NodeIdentifier IPV4_IFACE_NID = new NodeIdentifier(QName.create(LinkDescriptors.QNAME, "ipv4-interface-address").intern());
+    private static final NodeIdentifier IPV6_IFACE_NID = new NodeIdentifier(QName.create(LinkDescriptors.QNAME, "ipv6-interface-address").intern());
     @VisibleForTesting
-    public static final NodeIdentifier IPV4_NEIGHBOR_NID = new NodeIdentifier(QName.cachedReference(QName.create(LinkDescriptors.QNAME, "ipv4-neighbor-address")));
-    private static final NodeIdentifier IPV6_NEIGHBOR_NID = new NodeIdentifier(QName.cachedReference(QName.create(LinkDescriptors.QNAME, "ipv6-neighbor-address")));
+    public static final NodeIdentifier IPV4_NEIGHBOR_NID = new NodeIdentifier(QName.create(LinkDescriptors.QNAME, "ipv4-neighbor-address").intern());
+    private static final NodeIdentifier IPV6_NEIGHBOR_NID = new NodeIdentifier(QName.create(LinkDescriptors.QNAME, "ipv6-neighbor-address").intern());
     @VisibleForTesting
-    public static final NodeIdentifier LINK_LOCAL_NID = new NodeIdentifier(QName.cachedReference(QName.create(LinkDescriptors.QNAME, "link-local-identifier")));
+    public static final NodeIdentifier LINK_LOCAL_NID = new NodeIdentifier(QName.create(LinkDescriptors.QNAME, "link-local-identifier").intern());
     @VisibleForTesting
-    public static final NodeIdentifier LINK_REMOTE_NID = new NodeIdentifier(QName.cachedReference(QName.create(LinkDescriptors.QNAME, "link-remote-identifier")));
+    public static final NodeIdentifier LINK_REMOTE_NID = new NodeIdentifier(QName.create(LinkDescriptors.QNAME, "link-remote-identifier").intern());
 
     static LinkDescriptors parseLinkDescriptors(final ByteBuf buffer) throws BGPParsingException {
         final LinkDescriptorsBuilder builder = new LinkDescriptorsBuilder();
index f513edd2f636ecebc1db6ad2bf5b40ce50e44506..276ea6beb232df65ddfb8f5c6bf3ac7e56ffbfaa 100644 (file)
@@ -105,11 +105,11 @@ public final class LinkstateNlriParser implements NlriParser, NlriSerializer {
     @VisibleForTesting
     public static final NodeIdentifier TE_LSP_NID = new NodeIdentifier(TeLspCase.QNAME);
     @VisibleForTesting
-    public static final NodeIdentifier DISTINGUISHER_NID = new NodeIdentifier(QName.cachedReference(QName.create(CLinkstateDestination.QNAME, "route-distinguisher")));
+    public static final NodeIdentifier DISTINGUISHER_NID = new NodeIdentifier(QName.create(CLinkstateDestination.QNAME, "route-distinguisher").intern());
     @VisibleForTesting
-    public static final NodeIdentifier PROTOCOL_ID_NID = new NodeIdentifier(QName.cachedReference(QName.create(CLinkstateDestination.QNAME, "protocol-id")));
+    public static final NodeIdentifier PROTOCOL_ID_NID = new NodeIdentifier(QName.create(CLinkstateDestination.QNAME, "protocol-id").intern());
     @VisibleForTesting
-    public static final NodeIdentifier IDENTIFIER_NID = new NodeIdentifier(QName.cachedReference(QName.create(CLinkstateDestination.QNAME, "identifier")));
+    public static final NodeIdentifier IDENTIFIER_NID = new NodeIdentifier(QName.create(CLinkstateDestination.QNAME, "identifier").intern());
 
     private final boolean isVpn;
 
index 12d2b9c2b723f7c9bafc7cdd80c2462110fdf863..600a0535844d31abe17398ca261fc7596b69ff0f 100644 (file)
@@ -85,17 +85,17 @@ public final class NodeNlriParser {
 
     /* Node Descriptor QNames */
     @VisibleForTesting
-    public static final NodeIdentifier AS_NUMBER_NID = new NodeIdentifier(QName.cachedReference(QName.create(NodeDescriptors.QNAME, "as-number")));
+    public static final NodeIdentifier AS_NUMBER_NID = new NodeIdentifier(QName.create(NodeDescriptors.QNAME, "as-number").intern());
     @VisibleForTesting
-    public static final NodeIdentifier AREA_NID = new NodeIdentifier(QName.cachedReference(QName.create(NodeDescriptors.QNAME, "area-id")));
+    public static final NodeIdentifier AREA_NID = new NodeIdentifier(QName.create(NodeDescriptors.QNAME, "area-id").intern());
     @VisibleForTesting
-    public static final NodeIdentifier DOMAIN_NID = new NodeIdentifier(QName.cachedReference(QName.create(NodeDescriptors.QNAME, "domain-id")));
+    public static final NodeIdentifier DOMAIN_NID = new NodeIdentifier(QName.create(NodeDescriptors.QNAME, "domain-id").intern());
     @VisibleForTesting
     public static final NodeIdentifier ROUTER_NID = new NodeIdentifier(CRouterIdentifier.QNAME);
     @VisibleForTesting
-    public static final NodeIdentifier BGP_ROUTER_NID = new NodeIdentifier(QName.cachedReference(QName.create(NodeDescriptors.QNAME, "bgp-router-id")));
+    public static final NodeIdentifier BGP_ROUTER_NID = new NodeIdentifier(QName.create(NodeDescriptors.QNAME, "bgp-router-id").intern());
     @VisibleForTesting
-    public static final NodeIdentifier MEMBER_ASN_NID = new NodeIdentifier(QName.cachedReference(QName.create(NodeDescriptors.QNAME, "member-asn")));
+    public static final NodeIdentifier MEMBER_ASN_NID = new NodeIdentifier(QName.create(NodeDescriptors.QNAME, "member-asn").intern());
 
     /* Router Identifier QNames */
     @VisibleForTesting
@@ -107,14 +107,14 @@ public final class NodeNlriParser {
     @VisibleForTesting
     public static final NodeIdentifier OSPF_PSEUDONODE_NID = new NodeIdentifier(OspfPseudonode.QNAME);
     @VisibleForTesting
-    public static final NodeIdentifier ISO_SYSTEM_NID = new NodeIdentifier(QName.cachedReference(QName.create(NodeDescriptors.QNAME, "iso-system-id")));
+    public static final NodeIdentifier ISO_SYSTEM_NID = new NodeIdentifier(QName.create(NodeDescriptors.QNAME, "iso-system-id").intern());
     @VisibleForTesting
-    public static final NodeIdentifier ISIS_ROUTER_NID = new NodeIdentifier(QName.cachedReference(QName.create(NodeDescriptors.QNAME, "is-is-router-identifier")));
+    public static final NodeIdentifier ISIS_ROUTER_NID = new NodeIdentifier(QName.create(NodeDescriptors.QNAME, "is-is-router-identifier").intern());
     @VisibleForTesting
-    public static final NodeIdentifier PSN_NID = new NodeIdentifier(QName.cachedReference(QName.create(NodeDescriptors.QNAME, "psn")));
+    public static final NodeIdentifier PSN_NID = new NodeIdentifier(QName.create(NodeDescriptors.QNAME, "psn").intern());
     @VisibleForTesting
-    public static final NodeIdentifier OSPF_ROUTER_NID = new NodeIdentifier(QName.cachedReference(QName.create(NodeDescriptors.QNAME, "ospf-router-id")));
-    private static final NodeIdentifier LAN_IFACE_NID = new NodeIdentifier(QName.cachedReference(QName.create(NodeDescriptors.QNAME, "lan-interface")));
+    public static final NodeIdentifier OSPF_ROUTER_NID = new NodeIdentifier(QName.create(NodeDescriptors.QNAME, "ospf-router-id").intern());
+    private static final NodeIdentifier LAN_IFACE_NID = new NodeIdentifier(QName.create(NodeDescriptors.QNAME, "lan-interface").intern());
 
     static org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.NodeIdentifier parseNodeDescriptors(final ByteBuf buffer, final NlriType nlriType, final boolean local) throws BGPParsingException {
         AsNumber asnumber = null;
index e27b3e235e8157728ea1843eadab7009c9c6bbe8..3728d07c3d18e76278c340c160454be548b442df 100644 (file)
@@ -47,9 +47,9 @@ public final class PrefixNlriParser {
 
     /* Prefix Descriptor QNames */
     @VisibleForTesting
-    public static final NodeIdentifier OSPF_ROUTE_NID = new NodeIdentifier(QName.cachedReference(QName.create(PrefixDescriptors.QNAME, "ospf-route-type")));
+    public static final NodeIdentifier OSPF_ROUTE_NID = new NodeIdentifier(QName.create(PrefixDescriptors.QNAME, "ospf-route-type").intern());
     @VisibleForTesting
-    public static final NodeIdentifier IP_REACH_NID = new NodeIdentifier(QName.cachedReference(QName.create(PrefixDescriptors.QNAME, "ip-reachability-information")));
+    public static final NodeIdentifier IP_REACH_NID = new NodeIdentifier(QName.create(PrefixDescriptors.QNAME, "ip-reachability-information").intern());
 
     static PrefixDescriptors parsePrefixDescriptors(final ByteBuf buffer, final boolean ipv4) throws BGPParsingException {
         final PrefixDescriptorsBuilder builder = new PrefixDescriptorsBuilder();
index 6258f137a01131af28e165f0abba46daf821f5c8..7aa04651a217964ee56310a216cbdb64ab148933 100644 (file)
@@ -38,22 +38,22 @@ public final class TeLspNlriParser {
 
     @VisibleForTesting
     public static final YangInstanceIdentifier.NodeIdentifier LSP_ID = new YangInstanceIdentifier.NodeIdentifier(
-        QName.cachedReference(QName.create(CLinkstateDestination.QNAME, "lsp-id")));
+        QName.create(CLinkstateDestination.QNAME, "lsp-id").intern());
     @VisibleForTesting
     public static final YangInstanceIdentifier.NodeIdentifier TUNNEL_ID = new YangInstanceIdentifier.NodeIdentifier(
-        QName.cachedReference(QName.create(CLinkstateDestination.QNAME, "tunnel-id")));
+        QName.create(CLinkstateDestination.QNAME, "tunnel-id").intern());
     @VisibleForTesting
     public static final YangInstanceIdentifier.NodeIdentifier IPV4_TUNNEL_SENDER_ADDRESS = new YangInstanceIdentifier.NodeIdentifier(
-        QName.cachedReference(QName.create(CLinkstateDestination.QNAME, "ipv4-tunnel-sender-address")));
+        QName.create(CLinkstateDestination.QNAME, "ipv4-tunnel-sender-address").intern());
     @VisibleForTesting
     public static final YangInstanceIdentifier.NodeIdentifier IPV4_TUNNEL_ENDPOINT_ADDRESS = new YangInstanceIdentifier
-        .NodeIdentifier(QName.cachedReference(QName.create(CLinkstateDestination.QNAME, "ipv4-tunnel-endpoint-address")));
+        .NodeIdentifier(QName.create(CLinkstateDestination.QNAME, "ipv4-tunnel-endpoint-address").intern());
     @VisibleForTesting
     public static final YangInstanceIdentifier.NodeIdentifier IPV6_TUNNEL_SENDER_ADDRESS = new YangInstanceIdentifier
-        .NodeIdentifier( QName.cachedReference(QName.create(CLinkstateDestination.QNAME, "ipv6-tunnel-sender-address")));
+        .NodeIdentifier( QName.create(CLinkstateDestination.QNAME, "ipv6-tunnel-sender-address").intern());
     @VisibleForTesting
     public static final YangInstanceIdentifier.NodeIdentifier IPV6_TUNNEL_ENDPOINT_ADDRESS = new YangInstanceIdentifier
-        .NodeIdentifier(QName.cachedReference(QName.create(CLinkstateDestination.QNAME, "ipv6-tunnel-endpoint-address")));
+        .NodeIdentifier(QName.create(CLinkstateDestination.QNAME, "ipv6-tunnel-endpoint-address").intern());
 
     @VisibleForTesting
     public static final YangInstanceIdentifier.NodeIdentifier IPV4_CASE = new YangInstanceIdentifier.NodeIdentifier(Ipv4Case.QNAME);
index 76784d8744531a200a29348ad4b876f4e8aaa480..b875083674d625809dc5bec4a31b52d4cd745722 100644 (file)
@@ -26,7 +26,7 @@ public final class TlvUtil {
     public static final int TOPOLOGY_ID_OFFSET = 0x3fff;
 
     public static final int MULTI_TOPOLOGY_ID = 263;
-    public static final NodeIdentifier MULTI_TOPOLOGY_NID = new NodeIdentifier(QName.cachedReference(QName.create(PrefixDescriptors.QNAME, "topology-identifier")));
+    public static final NodeIdentifier MULTI_TOPOLOGY_NID = new NodeIdentifier(QName.create(PrefixDescriptors.QNAME, "topology-identifier").intern());
     public static final int LOCAL_IPV4_ROUTER_ID = 1028;
     public static final int LOCAL_IPV6_ROUTER_ID = 1029;
 
index c1967838d70065fe0b59c0ff3efdcd6c15dfc42c..e6303f68879138335a00db1415bd09b4c63b2a4a 100644 (file)
@@ -28,7 +28,7 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
  */
 public class BGPApplicationPeerModule extends org.opendaylight.controller.config.yang.bgp.rib.impl.AbstractBGPApplicationPeerModule {
 
-    private static final QName APP_ID_QNAME = QName.cachedReference(QName.create(ApplicationRib.QNAME, "id"));
+    private static final QName APP_ID_QNAME = QName.create(ApplicationRib.QNAME, "id").intern();
 
     public BGPApplicationPeerModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
         super(identifier, dependencyResolver);
index 85a5c079558f55ae8ef00b2c0bceb1775d10bbe1..bb39dd31423544051336ecaa563af208f0483239 100644 (file)
@@ -48,7 +48,7 @@ abstract class AbstractPeerRoleTracker {
         peerRoleChanged(peerPath, role);
     }
 
-    static final NodeIdentifier PEER_ROLE_NID = new NodeIdentifier(QName.cachedReference(QName.create(Peer.QNAME, "peer-role")));
+    static final NodeIdentifier PEER_ROLE_NID = new NodeIdentifier(QName.create(Peer.QNAME, "peer-role").intern());
     static final NodeIdentifier PEER_TABLES = new NodeIdentifier(SupportedTables.QNAME);
 
     protected AbstractPeerRoleTracker() {
index 58210bcb6526c0636e13724f42323a8bb4e248b8..90849d08799d56e72033d205f809ce67512383da 100644 (file)
@@ -63,8 +63,8 @@ final class AdjRibInWriter {
     static final LeafNode<Boolean> ATTRIBUTES_UPTODATE_FALSE = ImmutableNodes.leafNode(QName.create(Attributes.QNAME, "uptodate"), Boolean.FALSE);
     private static final LeafNode<Boolean> ATTRIBUTES_UPTODATE_TRUE = ImmutableNodes.leafNode(ATTRIBUTES_UPTODATE_FALSE.getNodeType(), Boolean.TRUE);
     @VisibleForTesting
-    static final QName PEER_ID_QNAME = QName.cachedReference(QName.create(Peer.QNAME, "peer-id"));
-    private static final QName PEER_ROLE_QNAME = QName.cachedReference(QName.create(Peer.QNAME, "peer-role"));
+    static final QName PEER_ID_QNAME = QName.create(Peer.QNAME, "peer-id").intern();
+    private static final QName PEER_ROLE_QNAME = QName.create(Peer.QNAME, "peer-role").intern();
     private static final NodeIdentifier ADJRIBIN = new NodeIdentifier(AdjRibIn.QNAME);
     private static final NodeIdentifier ADJRIBOUT = new NodeIdentifier(AdjRibOut.QNAME);
     private static final NodeIdentifier EFFRIBIN = new NodeIdentifier(EffectiveRibIn.QNAME);
index 72827d4299e3f616327c03d3f8e21d2e773483af..19625a8845ff7beefb6132afd9b906c82e165c7d 100644 (file)
@@ -53,7 +53,7 @@ final class AdjRibOutListener implements DOMDataTreeChangeListener {
 
     private static final Logger LOG = LoggerFactory.getLogger(AdjRibOutListener.class);
 
-    static final QName PREFIX_QNAME = QName.cachedReference(QName.create(Ipv4Route.QNAME, "prefix"));
+    static final QName PREFIX_QNAME = QName.create(Ipv4Route.QNAME, "prefix").intern();
     private final YangInstanceIdentifier.NodeIdentifier routeKeyLeaf = new YangInstanceIdentifier.NodeIdentifier(PREFIX_QNAME);
 
     private final ChannelOutputLimiter session;
index 0268c470c62b63e1f68dec00b9791d9906d99e30..0fc1ab1ae928960e92ab3b8a1de5d3772f6dcff1 100644 (file)
@@ -68,11 +68,11 @@ final class AttributeOperations {
             new CacheLoader<QNameModule, ImmutableSet<QName>>() {
                 @Override
                 public ImmutableSet<QName> load(final QNameModule key) {
-                    return ImmutableSet.of(QName.cachedReference(QName.create(key, Origin.QNAME.getLocalName())),
-                        QName.cachedReference(QName.create(key, AsPath.QNAME.getLocalName())),
-                        QName.cachedReference(QName.create(key, CNextHop.QNAME.getLocalName())),
-                        QName.cachedReference(QName.create(key, Communities.QNAME.getLocalName())),
-                        QName.cachedReference(QName.create(key, ExtendedCommunities.QNAME.getLocalName())));
+                    return ImmutableSet.of(QName.create(key, Origin.QNAME.getLocalName()).intern(),
+                        QName.create(key, AsPath.QNAME.getLocalName()).intern(),
+                        QName.create(key, CNextHop.QNAME.getLocalName()).intern(),
+                        QName.create(key, Communities.QNAME.getLocalName()).intern(),
+                        QName.create(key, ExtendedCommunities.QNAME.getLocalName()).intern());
                 }
             });
     private final ImmutableSet<QName> transitiveCollection;
@@ -90,20 +90,20 @@ final class AttributeOperations {
     private final NodeIdentifier transitiveLeaf;
 
     private AttributeOperations(final QNameModule namespace) {
-        this.asPathContainer = new NodeIdentifier(QName.cachedReference(QName.create(namespace, AsPath.QNAME.getLocalName())));
-        this.asPathSegments = new NodeIdentifier(QName.cachedReference(QName.create(namespace, Segments.QNAME.getLocalName())));
-        this.asPathSequence = new NodeIdentifier(QName.cachedReference(QName.create(namespace, "as-sequence")));
-        this.asNumberQname = QName.cachedReference(QName.create(namespace, "as-number"));
+        this.asPathContainer = new NodeIdentifier(QName.create(namespace, AsPath.QNAME.getLocalName()).intern());
+        this.asPathSegments = new NodeIdentifier(QName.create(namespace, Segments.QNAME.getLocalName()).intern());
+        this.asPathSequence = new NodeIdentifier(QName.create(namespace, "as-sequence").intern());
+        this.asNumberQname = QName.create(namespace, "as-number").intern();
 
-        this.clusterListContainer = new NodeIdentifier(QName.cachedReference(QName.create(namespace, ClusterId.QNAME.getLocalName())));
-        this.clusterQname = QName.cachedReference(QName.create(namespace, "cluster"));
+        this.clusterListContainer = new NodeIdentifier(QName.create(namespace, ClusterId.QNAME.getLocalName()).intern());
+        this.clusterQname = QName.create(namespace, "cluster").intern();
         this.clusterListLeaf = new NodeIdentifier(this.clusterQname);
         this.clusterListPath = ImmutableList.<PathArgument>of(this.clusterListContainer, this.clusterListLeaf);
-        this.originatorIdContainer = new NodeIdentifier(QName.cachedReference(QName.create(namespace, OriginatorId.QNAME.getLocalName())));
-        this.originatorIdLeaf = new NodeIdentifier(QName.cachedReference(QName.create(namespace, "originator")));
+        this.originatorIdContainer = new NodeIdentifier(QName.create(namespace, OriginatorId.QNAME.getLocalName()).intern());
+        this.originatorIdLeaf = new NodeIdentifier(QName.create(namespace, "originator").intern());
         this.originatorIdPath = ImmutableList.<PathArgument>of(this.originatorIdContainer, this.originatorIdLeaf);
 
-        this.transitiveLeaf = new NodeIdentifier(QName.cachedReference(QName.create(UnrecognizedAttributes.QNAME, "transitive")));
+        this.transitiveLeaf = new NodeIdentifier(QName.create(UnrecognizedAttributes.QNAME, "transitive").intern());
         this.transitiveCollection = TRANSITIVE_CACHE.getUnchecked(namespace);
     }
 
index e17cad2e673133343890f4dcc8445e212e54ec52..cb0668fc4b86611f630a5bd6542c2a719de5bf8d 100644 (file)
@@ -55,24 +55,24 @@ final class BestPathState {
         private final NodeIdentifier asSeqNid;
 
         NamespaceSpecificIds(final QName namespace) {
-            NodeIdentifier container = new NodeIdentifier(QName.cachedReference(QName.create(namespace, AsPath.QNAME.getLocalName())));
-            NodeIdentifier leaf = new NodeIdentifier(QName.cachedReference(QName.create(namespace, "segments")));
+            NodeIdentifier container = new NodeIdentifier(QName.create(namespace, AsPath.QNAME.getLocalName().intern()));
+            NodeIdentifier leaf = new NodeIdentifier(QName.create(namespace, "segments").intern());
             this.asPath = ImmutableList.<PathArgument>of(container, leaf);
 
-            container = new NodeIdentifier(QName.cachedReference(QName.create(namespace, LocalPref.QNAME.getLocalName())));
-            leaf = new NodeIdentifier(QName.cachedReference(QName.create(namespace, "pref")));
+            container = new NodeIdentifier(QName.create(namespace, LocalPref.QNAME.getLocalName()).intern());
+            leaf = new NodeIdentifier(QName.create(namespace, "pref").intern());
             this.locPref = ImmutableList.<PathArgument>of(container, leaf);
 
-            container = new NodeIdentifier(QName.cachedReference(QName.create(namespace, MultiExitDisc.QNAME.getLocalName())));
-            leaf = new NodeIdentifier(QName.cachedReference(QName.create(namespace, "med")));
+            container = new NodeIdentifier(QName.create(namespace, MultiExitDisc.QNAME.getLocalName()).intern());
+            leaf = new NodeIdentifier(QName.create(namespace, "med").intern());
             this.med = ImmutableList.<PathArgument>of(container, leaf);
 
-            container = new NodeIdentifier(QName.cachedReference(QName.create(namespace, Origin.QNAME.getLocalName())));
-            leaf = new NodeIdentifier(QName.cachedReference(QName.create(namespace, "value")));
+            container = new NodeIdentifier(QName.create(namespace, Origin.QNAME.getLocalName()).intern());
+            leaf = new NodeIdentifier(QName.create(namespace, "value").intern());
             this.orig = ImmutableList.<PathArgument>of(container, leaf);
 
-            this.asSetNid = new NodeIdentifier(QName.cachedReference(QName.create(namespace, "as-set")));
-            this.asSeqNid = new NodeIdentifier(QName.cachedReference(QName.create(namespace, "as-sequence")));
+            this.asSetNid = new NodeIdentifier(QName.create(namespace, "as-set").intern());
+            this.asSeqNid = new NodeIdentifier(QName.create(namespace, "as-sequence").intern());
         }
 
         Collection<PathArgument> getAsPath() {
index 95daa3131c48c8ee1d16edf05c46864427b3f901..1bb3ce9a05f339b1a5250350e97c1831310a7752 100644 (file)
@@ -45,7 +45,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
  */
 final class IPv4RIBSupport extends AbstractIPRIBSupport {
     @VisibleForTesting
-    static final QName PREFIX_QNAME = QName.cachedReference(QName.create(Ipv4Route.QNAME, "prefix"));
+    static final QName PREFIX_QNAME = QName.create(Ipv4Route.QNAME, "prefix").intern();
     private static final IPv4RIBSupport SINGLETON = new IPv4RIBSupport();
     private static final ImmutableCollection<Class<? extends DataObject>> CACHEABLE_NLRI_OBJECTS =
             ImmutableSet.<Class<? extends DataObject>>of(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev150305.Ipv4Prefix.class);
index 7b0ebd2ea88cc49adad745b088f7cc8d35c3dd1f..902eba570c7a714f5f4705bdc0817b6a97ca1b6a 100644 (file)
@@ -43,7 +43,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
  * Class supporting IPv6 unicast RIBs.
  */
 final class IPv6RIBSupport extends AbstractIPRIBSupport {
-    private static final QName PREFIX_QNAME = QName.cachedReference(QName.create(Ipv6Route.QNAME, "prefix"));
+    private static final QName PREFIX_QNAME = QName.create(Ipv6Route.QNAME, "prefix").intern();
     private static final IPv6RIBSupport SINGLETON = new IPv6RIBSupport();
     private static final ImmutableCollection<Class<? extends DataObject>> CACHEABLE_NLRI_OBJECTS =
             ImmutableSet.<Class<? extends DataObject>>of(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev150305.Ipv6Prefix.class);
index 89b8fcf3a0bc37ebed0b70112a63ad58b54d2b63..e70596c9f250650100106f2b398e417b52eb3f87 100644 (file)
@@ -31,7 +31,7 @@ final class IdentifierUtils {
             return Tables.QNAME.equals(input.getNodeType());
         }
     };
-    private static final QName PEER_ID = QName.cachedReference(QName.create(Peer.QNAME, "peer-id"));
+    private static final QName PEER_ID = QName.create(Peer.QNAME, "peer-id").intern();
 
     private IdentifierUtils() {
         throw new UnsupportedOperationException();
index c8c7405b6d08590c7c1cea59b52c1b522554bcf9..cf022e717518cc6896c8e18caa8b65163965cf97 100644 (file)
@@ -81,7 +81,7 @@ import org.slf4j.LoggerFactory;
 public final class RIBImpl extends DefaultRibReference implements AutoCloseable, RIB, TransactionChainListener, SchemaContextListener {
     private static final Logger LOG = LoggerFactory.getLogger(RIBImpl.class);
     @VisibleForTesting
-    public static final QName RIB_ID_QNAME = QName.cachedReference(QName.create(Rib.QNAME, "id"));
+    public static final QName RIB_ID_QNAME = QName.create(Rib.QNAME, "id").intern();
     @VisibleForTesting
     public static final ContainerNode EMPTY_TABLE_ATTRIBUTES = ImmutableNodes.containerNode(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.rib.tables.Attributes.QNAME);
 
index 1b3bb9c4822bf3b08d52599f0e3a16cd0936b9c3..973b706ff92dceeeecefe716562276b5cd3e7946 100644 (file)
@@ -36,9 +36,9 @@ import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
 
 public class AttributeOperationsTest {
 
-    static final NodeIdentifier ORIGIN_NID = new NodeIdentifier(QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, Origin.QNAME.getLocalName())));
-    static final NodeIdentifier ORIGIN_VALUE_NID = new NodeIdentifier(QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "value")));
-    static final NodeIdentifier AS_PATH_NID = new NodeIdentifier(QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, AsPath.QNAME.getLocalName())));
+    static final NodeIdentifier ORIGIN_NID = new NodeIdentifier(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, Origin.QNAME.getLocalName()).intern());
+    static final NodeIdentifier ORIGIN_VALUE_NID = new NodeIdentifier(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "value").intern());
+    static final NodeIdentifier AS_PATH_NID = new NodeIdentifier(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, AsPath.QNAME.getLocalName()).intern());
     static final NodeIdentifier ATOMIC_NID = new NodeIdentifier(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, AtomicAggregate.QNAME.getLocalName()));
     static final NodeIdentifier CLUSTER_C_NID = new NodeIdentifier(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, ClusterId.QNAME.getLocalName()));
     static final NodeIdentifier CLUSTER_NID = new NodeIdentifier(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster"));
index 8ff07ae727923381a30490553801d0e488109bc6..60833ce430f307aacd13beb831b0ae283c80451c 100644 (file)
@@ -99,7 +99,7 @@ public class ExportPolicyTest {
      */
     private static ContainerNode createInputWithOriginator() {
         final DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> b = Builders.containerBuilder();
-        b.withNodeIdentifier(new NodeIdentifier(QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "attribute-container"))));
+        b.withNodeIdentifier(new NodeIdentifier(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "attribute-container").intern()));
         b.withChild(createClusterId());
         b.withChild(createOriginatorId());
         return b.build();
@@ -107,21 +107,21 @@ public class ExportPolicyTest {
 
     private static ContainerNode createInternalOutput() {
         final DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> b = Builders.containerBuilder();
-        b.withNodeIdentifier(new NodeIdentifier(QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "attribute-container"))));
+        b.withNodeIdentifier(new NodeIdentifier(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "attribute-container").intern()));
         b.withChild(createWithoutInternalClusterId());
         return b.build();
     }
 
     private static ContainerNode createClusterInput() {
         final DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> b = Builders.containerBuilder();
-        b.withNodeIdentifier(new NodeIdentifier(QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "attribute-container"))));
+        b.withNodeIdentifier(new NodeIdentifier(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "attribute-container").intern()));
         b.withChild(createClusterIdInput());
         return b.build();
     }
 
     private static ContainerNode createWithoutInternalClusterId() {
-        final QName clusterContQName = QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster-id"));
-        final QName clusterQName = QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster"));
+        final QName clusterContQName = QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster-id").intern();
+        final QName clusterQName = QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster").intern();
         final NodeIdentifier clusterContNid = new NodeIdentifier(clusterContQName);
         final NodeIdentifier clusterNid = new NodeIdentifier(clusterQName);
 
@@ -134,8 +134,8 @@ public class ExportPolicyTest {
     }
 
     private static ContainerNode createClusterId() {
-        final QName clusterContQName = QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster-id"));
-        final QName clusterQName = QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster"));
+        final QName clusterContQName = QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster-id").intern();
+        final QName clusterQName = QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster").intern();
         final NodeIdentifier clusterContNid = new NodeIdentifier(clusterContQName);
         final NodeIdentifier clusterNid = new NodeIdentifier(clusterQName);
 
@@ -150,8 +150,8 @@ public class ExportPolicyTest {
     }
 
     private static ContainerNode createClusterIdInput() {
-        final QName clusterContQName = QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster-id"));
-        final QName clusterQName = QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster"));
+        final QName clusterContQName = QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster-id").intern();
+        final QName clusterQName = QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "cluster").intern();
         final NodeIdentifier clusterContNid = new NodeIdentifier(clusterContQName);
         final NodeIdentifier clusterNid = new NodeIdentifier(clusterQName);
 
@@ -165,8 +165,8 @@ public class ExportPolicyTest {
     }
 
     private static ContainerNode createOriginatorId() {
-        final QName originatorContQName = QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "originator-id"));
-        final QName originatorQName = QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "originator"));
+        final QName originatorContQName = QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "originator-id").intern();
+        final QName originatorQName = QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "originator").intern();
         final NodeIdentifier originatorContNid = new NodeIdentifier(originatorContQName);
         final NodeIdentifier originatorNid = new NodeIdentifier(originatorQName);
 
@@ -189,7 +189,7 @@ public class ExportPolicyTest {
         }
         segB.addChild(BestPathSelectorTest.SET_SEGMENT).addChild(BestPathSelectorTest.SEQ_SEGMENT);
         return Builders.containerBuilder().withNodeIdentifier(new NodeIdentifier(BestPathSelectorTest.ATTRS_EXTENSION_Q))
-            .addChild(Builders.containerBuilder().withNodeIdentifier(new NodeIdentifier(QName.cachedReference(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "as-path"))))
+            .addChild(Builders.containerBuilder().withNodeIdentifier(new NodeIdentifier(QName.create(BestPathSelectorTest.ATTRS_EXTENSION_Q, "as-path").intern()))
                 .addChild(segB.build()).build()).build();
     }
 
index 4f73d6108efbd5a90f9d45a92edc3ee55ca9c199..4fee53aa1ab84f71e30ba86ddd4592655d1715f5 100644 (file)
@@ -29,18 +29,18 @@ import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableUn
 
 public class FromExternalImportPolicyTest {
 
-    private static final QName DATA_QNAME = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "attributes"));
-    private static final QName LOCALPREF = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "local-pref"));
-    private static final QName CLUSTERID = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "cluster-id"));
-    private static final QName CLUSTER = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "cluster"));
-    private static final QName ASPATH = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "as-path"));
-    private static final QName SEGMENT = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "segments"));
-    private static final QName UNRECOGNIZED = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "unrecognized-attributes"));
-    private static final QName NEXTHOP = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "c-next-hop"));
-    private static final QName IPV4NH = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "ipv4-next-hop"));
-    private static final QName ORIGINATOR = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "originator-id"));
-    private static final QName MED = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "multi-exit-disc"));
-    private static final QName ORIGIN = QName.cachedReference(QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "origin"));
+    private static final QName DATA_QNAME = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "attributes").intern();
+    private static final QName LOCALPREF = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "local-pref").intern();
+    private static final QName CLUSTERID = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "cluster-id").intern();
+    private static final QName CLUSTER = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "cluster").intern();
+    private static final QName ASPATH = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "as-path").intern();
+    private static final QName SEGMENT = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "segments").intern();
+    private static final QName UNRECOGNIZED = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "unrecognized-attributes");
+    private static final QName NEXTHOP = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "c-next-hop").intern();
+    private static final QName IPV4NH = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "ipv4-next-hop").intern();
+    private static final QName ORIGINATOR = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "originator-id").intern();
+    private static final QName MED = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "multi-exit-disc").intern();
+    private static final QName ORIGIN = QName.create("urn:opendaylight:params:xml:ns:yang:bgp-inet", "2013-09-19", "origin").intern();
 
     @Test
     public void testEffectiveAttributes() {
index cc12cf28215086fdd13ede97247af16b92e27191..6706b770411419f2ba09fd06c3ea6c109c337f7f 100644 (file)
@@ -71,13 +71,13 @@ public abstract class AbstractRIBSupport implements RIBSupport {
      * @param listClass Binding class of the route list, nust not be null;
      */
     protected AbstractRIBSupport(final Class<? extends Routes> cazeClass, final Class<? extends DataObject> containerClass, final Class<? extends Route> listClass) {
-        final QName qname = QName.cachedReference(BindingReflections.findQName(containerClass));
+        final QName qname = BindingReflections.findQName(containerClass).intern();
         this.routesContainerIdentifier = new NodeIdentifier(qname);
-        this.routeAttributesIdentifier = new NodeIdentifier(QName.cachedReference(QName.create(qname, Attributes.QNAME.getLocalName())));
+        this.routeAttributesIdentifier = new NodeIdentifier(QName.create(qname, Attributes.QNAME.getLocalName().intern()));
         this.cazeClass = Preconditions.checkNotNull(cazeClass);
         this.containerClass = Preconditions.checkNotNull(containerClass);
         this.listClass = Preconditions.checkNotNull(listClass);
-        this.routesListIdentifier = new NodeIdentifier(QName.cachedReference(BindingReflections.findQName(listClass)));
+        this.routesListIdentifier = new NodeIdentifier(BindingReflections.findQName(listClass).intern());
     }
 
     @Override
index 61f0e70ad454051e146c45554593cc1d7835004c..c40c3098fee314a93c76642e939b445b4ea1deaa 100644 (file)
@@ -18,8 +18,8 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdent
 
 public final class RibSupportUtils {
 
-    private static final QName AFI_QNAME = QName.cachedReference(QName.create(Tables.QNAME, "afi"));
-    private static final QName SAFI_QNAME = QName.cachedReference(QName.create(Tables.QNAME, "safi"));
+    private static final QName AFI_QNAME = QName.create(Tables.QNAME, "afi").intern();
+    private static final QName SAFI_QNAME = QName.create(Tables.QNAME, "safi").intern();
 
     private RibSupportUtils() {
         throw new UnsupportedOperationException("Utility class");