From: Robert Varga Date: Tue, 4 Jun 2019 17:51:43 +0000 (+0200) Subject: Take advantage of AugmentationIdentifier.create() X-Git-Tag: release/neon-sr2~10 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=d41d471e9bf9b7ccb6ca6175bfdb7b36baffe5b9 Take advantage of AugmentationIdentifier.create() When we are reading an augmentation identifier for the first time we can optimize the number of identifiers by consulting the global weak cache. JIRA: CONTROLLER-1898 Change-Id: I5cd2d87e0a7c3f01357beb1b097d4a16a6eda3e0 Signed-off-by: Robert Varga (cherry picked from commit 7c06dc0a88d544a0096ecf55e95680748f949b0f) --- diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/LithiumNormalizedNodeInputStreamReader.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/LithiumNormalizedNodeInputStreamReader.java index ae8738e60f..78cb0759c7 100755 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/LithiumNormalizedNodeInputStreamReader.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/LithiumNormalizedNodeInputStreamReader.java @@ -250,7 +250,7 @@ class LithiumNormalizedNodeInputStreamReader extends ForwardingDataInput impleme } AugmentationIdentifier readAugmentationIdentifier() throws IOException { - return new AugmentationIdentifier(readQNameSet()); + return AugmentationIdentifier.create(readQNameSet()); } NodeIdentifier readNodeIdentifier() throws IOException {