Improve getResolvedAugmentationSchema() 97/82897/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 31 May 2019 10:11:08 +0000 (12:11 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 2 Jul 2019 15:52:38 +0000 (17:52 +0200)
This method is used for instantiating prototypes, from whence
it is used all over the place. Sharing a single instance allows
us to slightly improve lookups.

Change-Id: I93eb21ef83aef80ab0f26614950ebb042a7473ed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit cd0ce4946f426fb56ce33cce9f894e43d4b0451e)

binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/util/BindingRuntimeContext.java

index 4f32fbc0e882e423225dee0b4589f4c155b9198d..564bca20895d6a5378cf5265f9be6df73b6102fa 100644 (file)
@@ -223,7 +223,7 @@ public final class BindingRuntimeContext implements Immutable {
             }
         }
 
-        final AugmentationIdentifier identifier = new AugmentationIdentifier(childNames);
+        final AugmentationIdentifier identifier = AugmentationIdentifier.create(childNames);
         final AugmentationSchemaNode proxy = new EffectiveAugmentationSchema(origSchema, realChilds);
         return new SimpleEntry<>(identifier, proxy);
     }