Merge remote-tracking branch 'origin/jetty-9.3.x' into jetty-9.4.x
This commit is contained in:
commit
fa1f103da7
|
@ -72,7 +72,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
||||||
public static final String CONTAINER_INITIALIZER_STARTER = "org.eclipse.jetty.containerInitializerStarter";
|
public static final String CONTAINER_INITIALIZER_STARTER = "org.eclipse.jetty.containerInitializerStarter";
|
||||||
public static final String MULTI_THREADED = "org.eclipse.jetty.annotations.multiThreaded";
|
public static final String MULTI_THREADED = "org.eclipse.jetty.annotations.multiThreaded";
|
||||||
public static final String MAX_SCAN_WAIT = "org.eclipse.jetty.annotations.maxWait";
|
public static final String MAX_SCAN_WAIT = "org.eclipse.jetty.annotations.maxWait";
|
||||||
public static final String JAVA_TARGET_VERSION = "org.eclipse.jetty.annotations.javaTargetVersion";
|
public static final String JAVA_TARGET_PLATFORM = "org.eclipse.jetty.annotations.javaTargetPlatform";
|
||||||
|
|
||||||
public static final int DEFAULT_MAX_SCAN_WAIT = 60; /* time in sec */
|
public static final int DEFAULT_MAX_SCAN_WAIT = 60; /* time in sec */
|
||||||
public static final boolean DEFAULT_MULTI_THREADED = true;
|
public static final boolean DEFAULT_MULTI_THREADED = true;
|
||||||
|
@ -420,7 +420,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
int javaPlatform = 0;
|
int javaPlatform = 0;
|
||||||
Object target = context.getAttribute(JAVA_TARGET_VERSION);
|
Object target = context.getAttribute(JAVA_TARGET_PLATFORM);
|
||||||
if (target!=null)
|
if (target!=null)
|
||||||
javaPlatform = Integer.valueOf(target.toString());
|
javaPlatform = Integer.valueOf(target.toString());
|
||||||
AnnotationParser parser = createAnnotationParser(javaPlatform);
|
AnnotationParser parser = createAnnotationParser(javaPlatform);
|
||||||
|
|
|
@ -492,6 +492,24 @@ public class AnnotationParser
|
||||||
_javaPlatform = 8;
|
_javaPlatform = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AnnotationParser()
|
||||||
|
{
|
||||||
|
this(JavaVersion.VERSION.getPlatform());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param javaPlatform The target java version or 0 for the current runtime.
|
||||||
|
*/
|
||||||
|
public AnnotationParser(int javaPlatform)
|
||||||
|
{
|
||||||
|
if (javaPlatform==0)
|
||||||
|
javaPlatform = JavaVersion.VERSION.getPlatform();
|
||||||
|
// TODO can only support 8 until ASM 6 is available
|
||||||
|
if (javaPlatform!=8)
|
||||||
|
LOG.warn("Annotation parsing only supports java8 until ASM6 upgrade");
|
||||||
|
_javaPlatform = 8;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a class as having been parsed.
|
* Add a class as having been parsed.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue