MDSAL-310 Binding v2 codec - Instance identifier should not reference choice/case.
[mdsal.git] / binding2 / mdsal-binding2-dom-codec / src / main / java / org / opendaylight / mdsal / binding / javav2 / dom / codec / impl / context / KeyedListNodeCodecContext.java
index 2a093a091ce7e1cace009a8a6f772634da802364..fe805f5832ca73c2620658537d602991d9d6a120 100644 (file)
@@ -42,11 +42,11 @@ public final class KeyedListNodeCodecContext<D extends TreeNode & Identifiable<?
      * @param prototype
      *            - codec prototype of keyed list node
      */
-    KeyedListNodeCodecContext(final DataContainerCodecPrototype<ListSchemaNode> prototype) {
+    public KeyedListNodeCodecContext(final DataContainerCodecPrototype<ListSchemaNode> prototype) {
         super(prototype);
         this.codec = factory().getPathArgumentCodec(getBindingClass(), getSchema());
         try {
-            this.keyGetter = getBindingClass().getMethod("getKey");
+            this.keyGetter = getBindingClass().getMethod("getIdentifier");
         } catch (final NoSuchMethodException e) {
             throw new IllegalStateException("Required method not available", e);
         }