8151914: java/util/jar/JarFile/MultiReleaseJar* tests do not declare module dependences
Reviewed-by: chegar
This commit is contained in:
parent
9c17407e9e
commit
e7e64ceea3
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,6 +26,9 @@
|
||||
* @bug 8132734
|
||||
* @summary Test the System properties for JarFile that support multi-release jar files
|
||||
* @library /lib/testlibrary/java/util/jar
|
||||
* @modules jdk.jartool
|
||||
* jdk.compiler
|
||||
* jdk.httpserver
|
||||
* @build Compiler JarBuilder CreateMultiReleaseTestJars SimpleHttpServer
|
||||
* @run testng MultiReleaseJarHttpProperties
|
||||
* @run testng/othervm -Djdk.util.jar.version=0 MultiReleaseJarHttpProperties
|
3
jdk/test/java/util/jar/JarFile/mrjar/TEST.properties
Normal file
3
jdk/test/java/util/jar/JarFile/mrjar/TEST.properties
Normal file
@ -0,0 +1,3 @@
|
||||
modules = \
|
||||
jdk.compiler \
|
||||
jdk.jartool
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,7 +44,7 @@ class Compiler {
|
||||
// so do it the old fashioned way
|
||||
// options = Arrays.asList("-release", String.valueOf(release));
|
||||
String target = String.valueOf(release);
|
||||
options = Arrays.asList("-source", target, "-target", target);
|
||||
options = Arrays.asList("-source", target, "-target", target, "-classpath", "");
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -53,7 +53,9 @@ class Compiler {
|
||||
Map<String,ClassFileObject> cfos = createClassFileObjects();
|
||||
JavaCompiler jc = ToolProvider.getSystemJavaCompiler();
|
||||
JavaFileManager jfm = new CustomFileManager(jc.getStandardFileManager(null, null, null), cfos);
|
||||
jc.getTask(null, jfm, null, options, null, cunits).call();
|
||||
if(!jc.getTask(null, jfm, null, options, null, cunits).call()) {
|
||||
throw new RuntimeException("Compilation failed");
|
||||
}
|
||||
return createOutput(cfos);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user