Issue #1933
Add some comments, changes from code review. Signed-off-by: Jan Bartel <janb@webtide.com>
This commit is contained in:
parent
10a6f57bd8
commit
98d8c2400d
|
@ -73,7 +73,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
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 MAX_SCAN_WAIT = "org.eclipse.jetty.annotations.maxWait";
|
||||
public static final String JAVA_TARGET_PLATFORM = JavaVersion.JAVA_TARGET_PLATFORM;
|
||||
|
||||
|
||||
public static final int DEFAULT_MAX_SCAN_WAIT = 60; /* time in sec */
|
||||
public static final boolean DEFAULT_MULTI_THREADED = true;
|
||||
|
@ -421,7 +421,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
throws Exception
|
||||
{
|
||||
int javaPlatform = 0;
|
||||
Object target = context.getAttribute(JAVA_TARGET_PLATFORM);
|
||||
Object target = context.getAttribute(JavaVersion.JAVA_TARGET_PLATFORM);
|
||||
if (target!=null)
|
||||
javaPlatform = Integer.valueOf(target.toString());
|
||||
AnnotationParser parser = createAnnotationParser(javaPlatform);
|
||||
|
|
|
@ -28,6 +28,10 @@ import java.util.regex.Pattern;
|
|||
public class JavaVersion
|
||||
{
|
||||
|
||||
/**
|
||||
* Context attribute that can be set to target a different version of the jvm than the current runtime.
|
||||
* Acceptable values should correspond to those returned by JavaVersion.getPlatform().
|
||||
*/
|
||||
public static final String JAVA_TARGET_PLATFORM = "org.eclipse.jetty.javaTargetPlatform";
|
||||
|
||||
// Copy of version in jetty-start
|
||||
|
|
|
@ -226,7 +226,7 @@ public class WebInfConfiguration extends AbstractConfiguration
|
|||
|
||||
//if running on jvm 9 or above, we we won't be able to look at the application classloader
|
||||
//to extract urls, so we need to examine the classpath instead.
|
||||
if (JavaVersion.VERSION.getMajor() >= 9)
|
||||
if (JavaVersion.VERSION.getPlatform() >= 9)
|
||||
{
|
||||
tmp = System.getProperty("java.class.path");
|
||||
if (tmp != null)
|
||||
|
|
Loading…
Reference in New Issue