Bump byte-buddy to 1.10.9 29/88929/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 7 Apr 2020 09:52:49 +0000 (11:52 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 7 Apr 2020 15:10:53 +0000 (17:10 +0200)
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.10.8
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.10.9

Change-Id: I6dd7ef731fefd5de334b268f23c9a24bf5ae0a41
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-dom-codec/pom.xml
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/NotificationCodecContext.java

index 667b635bdf8cb67485bc0f8983b7fd6e9cd63bfa..c71e30616a9febf15b052bdc35646841630fd253 100644 (file)
@@ -29,7 +29,7 @@
             <!-- We are going to shade this -->
             <groupId>net.bytebuddy</groupId>
             <artifactId>byte-buddy</artifactId>
-            <version>1.10.7</version>
+            <version>1.10.9</version>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
index 6553f707824baf39ec9930ec67fc7757b5dab20d..3388a9a2f0a0e5f7dfaa81ea2ceaadb9a7488f83 100644 (file)
@@ -43,7 +43,16 @@ import org.opendaylight.yangtools.yang.model.api.NotificationDefinition;
 final class NotificationCodecContext<D extends DataObject & Notification>
         extends DataObjectCodecContext<D, NotificationDefinition> {
     private static final Generic EVENT_INSTANT_AWARE = TypeDefinition.Sort.describe(EventInstantAware.class);
-    private static final MethodDescription EVENT_INSTANT = EVENT_INSTANT_AWARE.getDeclaredMethods().getOnly();
+
+    private static final String EVENT_INSTANT_NAME;
+    private static final Generic EVENT_INSTANT_RETTYPE;
+
+    static {
+        final MethodDescription eventInstance = EVENT_INSTANT_AWARE.getDeclaredMethods().getOnly();
+        EVENT_INSTANT_NAME = eventInstance.getName();
+        EVENT_INSTANT_RETTYPE = eventInstance.getReturnType();
+    }
+
     private static final Generic BB_DOCC = TypeDefinition.Sort.describe(DataObjectCodecContext.class);
     private static final Generic BB_NNC = TypeDefinition.Sort.describe(NormalizedNodeContainer.class);
     private static final Generic BB_I = TypeDefinition.Sort.describe(Instant.class);
@@ -73,7 +82,8 @@ final class NotificationCodecContext<D extends DataObject & Notification>
                     .defineConstructor(Opcodes.ACC_PUBLIC | Opcodes.ACC_SYNTHETIC)
                         .withParameters(BB_DOCC, BB_NNC, BB_I)
                         .intercept(ConstructorImplementation.INSTANCE)
-                    .define(EVENT_INSTANT).intercept(EventInstantImplementation.INSTANCE)
+                    .defineMethod(EVENT_INSTANT_NAME, EVENT_INSTANT_RETTYPE, Opcodes.ACC_PUBLIC | Opcodes.ACC_SYNTHETIC)
+                        .intercept(EventInstantImplementation.INSTANCE)
                     .make());
             });