BUG-650: improve toYangInstanceIdentifier() speed 41/10341/2
authorRobert Varga <rovarga@cisco.com>
Tue, 26 Aug 2014 20:06:01 +0000 (22:06 +0200)
committerRobert Varga <rovarga@cisco.com>
Tue, 26 Aug 2014 21:18:55 +0000 (23:18 +0200)
This removes a superfluous call to getCodecContextNode(), since that
call is already performed by the InstanceIdentifierCodec.

Change-Id: I2077e70517adf6795f805b6c37c0a7e29b4fb9e5
Signed-off-by: Robert Varga <rovarga@cisco.com>
code-generator/binding-data-codec/src/main/java/org/opendaylight/yangtools/binding/data/codec/impl/BindingNormalizedNodeCodecRegistry.java

index dcfeaa34195db6cf6c793af6bfa8a8415a1cd8ab..af7c9d998f28ad6e338d679279ce414b379f85e2 100644 (file)
@@ -17,7 +17,6 @@ import com.google.common.cache.LoadingCache;
 import java.io.IOException;
 import java.util.AbstractMap.SimpleEntry;
 import java.util.ArrayList;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -75,8 +74,6 @@ public class BindingNormalizedNodeCodecRegistry implements DataObjectSerializerR
 
     @Override
     public YangInstanceIdentifier toYangInstanceIdentifier(final InstanceIdentifier<?> binding) {
-        List<YangInstanceIdentifier.PathArgument> builder = new LinkedList<>();
-        codecContext.getCodecContextNode(binding, builder);
         return codecContext.getInstanceIdentifierCodec().serialize(binding);
     }