From dc8f86062090a5f6278fedbcb2f12a36220180b8 Mon Sep 17 00:00:00 2001 From: Ryan Schmitt Date: Sat, 18 Feb 2017 13:34:44 -0800 Subject: [PATCH] Support JDK9 Fixes #12. --- jmh-benchmark/pom.xml | 2 +- lib/pom.xml | 10 +++++----- .../net/fushizen/invokedynamic/proxy/DynamicProxy.java | 5 ++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/jmh-benchmark/pom.xml b/jmh-benchmark/pom.xml index cc9f359..87e9372 100644 --- a/jmh-benchmark/pom.xml +++ b/jmh-benchmark/pom.xml @@ -73,7 +73,7 @@ THE POSSIBILITY OF SUCH DAMAGE. UTF-8 - 1.6.1 + 1.19 1.8 benchmarks diff --git a/lib/pom.xml b/lib/pom.xml index 5919b47..924a2a0 100644 --- a/lib/pom.xml +++ b/lib/pom.xml @@ -96,7 +96,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.9.1 + 3.0.0-M1 attach-javadocs @@ -136,18 +136,18 @@ org.ow2.asm asm-all - 5.0.3 + 6.0_BETA test org.ow2.asm asm - 5.0.3 + 6.0_BETA org.mockito - mockito-all - 1.10.19 + mockito-core + 2.10.0 test diff --git a/lib/src/main/java/net/fushizen/invokedynamic/proxy/DynamicProxy.java b/lib/src/main/java/net/fushizen/invokedynamic/proxy/DynamicProxy.java index f3ecb6d..685999c 100644 --- a/lib/src/main/java/net/fushizen/invokedynamic/proxy/DynamicProxy.java +++ b/lib/src/main/java/net/fushizen/invokedynamic/proxy/DynamicProxy.java @@ -419,9 +419,11 @@ private static void emitMethod( int access = ACC_PROTECTED; ConcreteMethodTracker concreteMethodTracker = new ConcreteMethodTracker(); + boolean isInterface = true; for (Method m : contributors) { concreteMethodTracker.add(m); + isInterface &= m.getDeclaringClass().isInterface(); if (Modifier.PUBLIC == (m.getModifiers() & Modifier.PUBLIC)) { access = ACC_PUBLIC; } @@ -472,7 +474,8 @@ private static void emitMethod( H_INVOKESPECIAL, Type.getInternalName(superMethod.getDeclaringClass()), superMethod.getName(), - Type.getMethodDescriptor(superMethod) + Type.getMethodDescriptor(superMethod), + isInterface ); }