Merge pull request #2957 from eclipse/jetty-9.4.x-2941-asm_jdk11

Issue #2941 - JDK 11: UnsupportedOperationException at AnnotationParser.scanClass.
This commit is contained in:
Simone Bordet 2018-11-01 17:49:22 +01:00 committed by GitHub
commit d33f65d322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 6 deletions

View File

@ -20,7 +20,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>org.objectweb.asm;version="[5.0,7)",*</Import-Package>
<Import-Package>org.objectweb.asm;version="5",*</Import-Package>
<Require-Capability>osgi.serviceloader; filter:="(osgi.serviceloader=javax.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional</Require-Capability>
</instructions>
</configuration>

View File

@ -69,9 +69,9 @@ import org.objectweb.asm.Opcodes;
public class AnnotationParser
{
private static final Logger LOG = Log.getLogger(AnnotationParser.class);
private static final int ASM_OPCODE_VERSION = Opcodes.ASM6; //compatibility of api
private static final String ASM_OPCODE_VERSION_STR = "ASM6";
private static final int ASM_OPCODE_VERSION = Opcodes.ASM7; //compatibility of api
private static final String ASM_OPCODE_VERSION_STR = "ASM7";
/**
* Map of classnames scanned and the first location from which scan occurred
*/
@ -115,6 +115,11 @@ public class AnnotationParser
asmVersion = Opcodes.ASM6;
break;
}
case 7:
{
asmVersion = Opcodes.ASM7;
break;
}
default:
{
LOG.warn("Unrecognized ASM version, assuming {}", ASM_OPCODE_VERSION_STR);

View File

@ -80,7 +80,7 @@
javax.servlet.http;version="[3.1,3.2)",
javax.transaction;version="1.1.0";resolution:=optional,
javax.transaction.xa;version="1.1.0";resolution:=optional,
org.objectweb.asm;version=4;resolution:=optional,
org.objectweb.asm;version="5";resolution:=optional,
org.osgi.framework,
org.osgi.service.cm;version="1.2.0",
org.osgi.service.packageadmin,

View File

@ -15,6 +15,7 @@
<packaging>pom</packaging>
<properties>
<asm.version>6.2</asm.version>
<osgi-version>3.6.0.v20100517</osgi-version>
<osgi-services-version>3.2.100.v20100503</osgi-services-version>
<equinox-http-servlet-version>1.0.0-v20070606</equinox-http-servlet-version>

View File

@ -26,7 +26,7 @@
<!-- default values are unsupported, but required to be defined for reactor sanity reasons -->
<alpn.version>undefined</alpn.version>
<conscrypt.version>1.1.4</conscrypt.version>
<asm.version>6.2</asm.version>
<asm.version>7.0</asm.version>
<jmh.version>1.21</jmh.version>
<jmhjar.name>benchmarks</jmhjar.name>
<tycho-version>1.2.0</tycho-version>