Fixed performance bug when Augmentation codecs we're not cached properly for fast... 82/5182/2
authorTony Tkacik <ttkacik@cisco.com>
Fri, 7 Feb 2014 19:52:13 +0000 (20:52 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 7 Feb 2014 20:04:26 +0000 (20:04 +0000)
Change-Id: I33e41bc778c4b11abded46650a2e4b0fcabb6519
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/LazyGeneratedCodecRegistry.java

index 99206141a7978e07e08b5987a04ad3be130aa2b2..a2dd0905044b1174bca5e9c7b137ea8d1a6930ae 100644 (file)
@@ -122,7 +122,7 @@ public class LazyGeneratedCodecRegistry implements //
                         .augmentationTransformerFor(object);
                 BindingCodec<Map<QName, Object>, Object> rawCodec = augmentRawCodec.newInstance();
                 codec = new AugmentationCodecWrapper<T>(rawCodec);
-                augmentationCodecs.put(augmentRawCodec, codec);
+                augmentationCodecs.put(object, codec);
             } catch (InstantiationException e) {
                 LOG.error("Can not instantiate raw augmentation codec {}", object.getSimpleName(), e);
             } catch (IllegalAccessException e) {