Bug 3151: Fix Not a Proxy Instance Exception 12/19812/1
authorThomas Bachman <tbachman@yahoo.com>
Thu, 7 May 2015 15:07:52 +0000 (11:07 -0400)
committerThomas Bachman <tbachman@yahoo.com>
Thu, 7 May 2015 15:07:52 +0000 (11:07 -0400)
This fixes a bug where a "Not a Proxy Instance"
exception (also IllegalArgumentException) is thrown
when hashCode is invoked in a yangtools generated
builder.

Change-Id: Icb96311f2c0c77dc8ba1377279de18b0db3886d1
Signed-off-by: Thomas Bachman <tbachman@yahoo.com>
code-generator/binding-data-codec/src/main/java/org/opendaylight/yangtools/binding/data/codec/impl/LazyDataObject.java

index baefc901a104db1f4b7964c5f2f96ed697b60568..38884816a13c01d049f2edb40e6234eecb083e53 100644 (file)
@@ -109,7 +109,7 @@ class LazyDataObject<D extends DataObject> implements InvocationHandler, Augment
             final Object value = getBindingData(m);
             result = prime * result + ((value == null) ? 0 : value.hashCode());
         }
-        if (Augmentable.class.isAssignableFrom(context.getBindingClass())) {
+        if (Augmentation.class.isAssignableFrom(context.getBindingClass())) {
             result = prime * result + (getAugmentations(this).hashCode());
         }
         cachedHashcode = result;