From 1ba945b39b1ca61aeb293e218ce9d1441c65cd22 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 4 Oct 2018 13:47:56 +0200 Subject: [PATCH] Issue #2941 - JDK 11: UnsupportedOperationException at AnnotationParser.scanClass. Updated to ASM 7.0-beta, and defaulted AnnotationParser to ASM 7. Signed-off-by: Simone Bordet --- .../eclipse/jetty/annotations/AnnotationParser.java | 10 +++++++--- pom.xml | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java index b6d9d35ceff..33e9f9e5f61 100644 --- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java +++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java @@ -24,7 +24,6 @@ import java.io.InputStream; import java.net.URI; import java.net.URL; import java.nio.file.Path; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -69,8 +68,8 @@ import org.objectweb.asm.Opcodes; public class AnnotationParser { private static final Logger LOG = Log.getLogger(AnnotationParser.class); - protected static int ASM_OPCODE_VERSION = Opcodes.ASM6; //compatibility of api - protected static String ASM_OPCODE_VERSION_STR = "ASM6"; + protected static int ASM_OPCODE_VERSION = Opcodes.ASM7; //compatibility of api + protected static String ASM_OPCODE_VERSION_STR = "ASM7"; /** * Map of classnames scanned and the first location from which scan occurred @@ -118,6 +117,11 @@ public class AnnotationParser asmVersion = Opcodes.ASM6; break; } + case 7: + { + asmVersion = Opcodes.ASM7; + break; + } default: { LOG.warn("Unrecognized runtime asm version, assuming {}", ASM_OPCODE_VERSION_STR); diff --git a/pom.xml b/pom.xml index fae174072ef..9a16af6e4f2 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ undefined 1.1.4 - 6.2 + 7.0-beta 1.21 benchmarks 1.2.0