mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8188023: Avoid -source and -target javac options in nashorn ant compilation
Reviewed-by: jlaskey, hannesw
This commit is contained in:
parent
047f60b678
commit
a00dba8a16
6 changed files with 9 additions and 18 deletions
|
@ -174,8 +174,6 @@
|
||||||
<target name="compile" depends="prepare" description="Compiles nashorn">
|
<target name="compile" depends="prepare" description="Compiles nashorn">
|
||||||
<javac srcdir="${dynalink.module.src.dir}"
|
<javac srcdir="${dynalink.module.src.dir}"
|
||||||
destdir="${dynalink.module.classes.dir}"
|
destdir="${dynalink.module.classes.dir}"
|
||||||
source="${javac.source}"
|
|
||||||
target="${javac.target}"
|
|
||||||
debug="${javac.debug}"
|
debug="${javac.debug}"
|
||||||
encoding="${javac.encoding}"
|
encoding="${javac.encoding}"
|
||||||
includeantruntime="false" fork="true">
|
includeantruntime="false" fork="true">
|
||||||
|
@ -190,8 +188,6 @@
|
||||||
</delete>
|
</delete>
|
||||||
<javac srcdir="${nashorn.module.src.dir}"
|
<javac srcdir="${nashorn.module.src.dir}"
|
||||||
destdir="${nashorn.module.classes.dir}"
|
destdir="${nashorn.module.classes.dir}"
|
||||||
source="${javac.source}"
|
|
||||||
target="${javac.target}"
|
|
||||||
debug="${javac.debug}"
|
debug="${javac.debug}"
|
||||||
encoding="${javac.encoding}"
|
encoding="${javac.encoding}"
|
||||||
includeantruntime="false" fork="true">
|
includeantruntime="false" fork="true">
|
||||||
|
@ -207,8 +203,6 @@
|
||||||
</delete>
|
</delete>
|
||||||
<javac srcdir="${nashorn.shell.module.src.dir}"
|
<javac srcdir="${nashorn.shell.module.src.dir}"
|
||||||
destdir="${nashorn.shell.module.classes.dir}"
|
destdir="${nashorn.shell.module.classes.dir}"
|
||||||
source="${javac.source}"
|
|
||||||
target="${javac.target}"
|
|
||||||
debug="${javac.debug}"
|
debug="${javac.debug}"
|
||||||
encoding="${javac.encoding}"
|
encoding="${javac.encoding}"
|
||||||
includeantruntime="false" fork="true">
|
includeantruntime="false" fork="true">
|
||||||
|
@ -342,8 +336,6 @@
|
||||||
<javac srcdir="${test.src.dir}"
|
<javac srcdir="${test.src.dir}"
|
||||||
destdir="${build.test.classes.dir}"
|
destdir="${build.test.classes.dir}"
|
||||||
classpath="${javac.test.classpath}"
|
classpath="${javac.test.classpath}"
|
||||||
source="${javac.source}"
|
|
||||||
target="${javac.target}"
|
|
||||||
debug="${javac.debug}"
|
debug="${javac.debug}"
|
||||||
encoding="${javac.encoding}"
|
encoding="${javac.encoding}"
|
||||||
includeantruntime="false" fork="true">
|
includeantruntime="false" fork="true">
|
||||||
|
@ -351,7 +343,7 @@
|
||||||
<compilerarg value="-Xlint:unchecked"/>
|
<compilerarg value="-Xlint:unchecked"/>
|
||||||
<compilerarg value="-Xlint:deprecation"/>
|
<compilerarg value="-Xlint:deprecation"/>
|
||||||
<compilerarg value="-Xdiags:verbose"/>
|
<compilerarg value="-Xdiags:verbose"/>
|
||||||
<compilerarg line="${test.module.imports}"/>
|
<compilerarg line="${test.module.imports.compile.time}"/>
|
||||||
</javac>
|
</javac>
|
||||||
|
|
||||||
<copy todir="${build.test.classes.dir}/META-INF/services">
|
<copy todir="${build.test.classes.dir}/META-INF/services">
|
||||||
|
|
|
@ -24,8 +24,6 @@ application.title=nasgen
|
||||||
|
|
||||||
# source and target levels
|
# source and target levels
|
||||||
build.compiler=modern
|
build.compiler=modern
|
||||||
javac.source=1.7
|
|
||||||
javac.target=1.7
|
|
||||||
|
|
||||||
# This directory is removed when the project is cleaned:
|
# This directory is removed when the project is cleaned:
|
||||||
nasgen.build.dir=../../../../build/nashorn/nasgen
|
nasgen.build.dir=../../../../build/nashorn/nasgen
|
||||||
|
|
|
@ -24,8 +24,6 @@ application.title=nashorntask
|
||||||
|
|
||||||
# source and target levels
|
# source and target levels
|
||||||
build.compiler=modern
|
build.compiler=modern
|
||||||
javac.source=1.8
|
|
||||||
javac.target=1.8
|
|
||||||
|
|
||||||
# This directory is removed when the project is cleaned:
|
# This directory is removed when the project is cleaned:
|
||||||
nashorntask.build.dir=../../../../build/nashorn/nashorntask
|
nashorntask.build.dir=../../../../build/nashorn/nashorntask
|
||||||
|
|
|
@ -32,8 +32,6 @@ jdk.jline.src.dir=src/jdk.internal.le/share/classes
|
||||||
|
|
||||||
# source and target levels
|
# source and target levels
|
||||||
build.compiler=modern
|
build.compiler=modern
|
||||||
javac.source=1.9
|
|
||||||
javac.target=1.9
|
|
||||||
|
|
||||||
javadoc.option=\
|
javadoc.option=\
|
||||||
-tag "implSpec:a:Implementation Requirements:" \
|
-tag "implSpec:a:Implementation Requirements:" \
|
||||||
|
@ -146,7 +144,7 @@ javac.test.classpath=\
|
||||||
${file.reference.bsh.jar}${path.separator}\
|
${file.reference.bsh.jar}${path.separator}\
|
||||||
${file.reference.snakeyaml.jar}
|
${file.reference.snakeyaml.jar}
|
||||||
|
|
||||||
test.module.imports=\
|
test.module.imports.compile.time=\
|
||||||
--add-exports jdk.scripting.nashorn/jdk.nashorn.internal.ir=ALL-UNNAMED \
|
--add-exports jdk.scripting.nashorn/jdk.nashorn.internal.ir=ALL-UNNAMED \
|
||||||
--add-exports jdk.scripting.nashorn/jdk.nashorn.internal.codegen=ALL-UNNAMED \
|
--add-exports jdk.scripting.nashorn/jdk.nashorn.internal.codegen=ALL-UNNAMED \
|
||||||
--add-exports jdk.scripting.nashorn/jdk.nashorn.internal.parser=ALL-UNNAMED \
|
--add-exports jdk.scripting.nashorn/jdk.nashorn.internal.parser=ALL-UNNAMED \
|
||||||
|
@ -159,7 +157,10 @@ test.module.imports=\
|
||||||
--add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp=ALL-UNNAMED \
|
--add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp=ALL-UNNAMED \
|
||||||
--add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp.joni=ALL-UNNAMED \
|
--add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp.joni=ALL-UNNAMED \
|
||||||
--add-exports jdk.scripting.nashorn/jdk.nashorn.tools=ALL-UNNAMED \
|
--add-exports jdk.scripting.nashorn/jdk.nashorn.tools=ALL-UNNAMED \
|
||||||
--add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
|
--add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
|
||||||
|
|
||||||
|
test.module.imports.runtime=\
|
||||||
|
${test.module.imports.compile.time} \
|
||||||
--add-opens jdk.scripting.nashorn/jdk.nashorn.internal.runtime=ALL-UNNAMED \
|
--add-opens jdk.scripting.nashorn/jdk.nashorn.internal.runtime=ALL-UNNAMED \
|
||||||
--add-opens jdk.scripting.nashorn/jdk.nashorn.internal.runtime.doubleconv=ALL-UNNAMED
|
--add-opens jdk.scripting.nashorn/jdk.nashorn.internal.runtime.doubleconv=ALL-UNNAMED
|
||||||
|
|
||||||
|
@ -359,7 +360,7 @@ run.test.user.country=TR
|
||||||
|
|
||||||
run.test.jvmargs.common=\
|
run.test.jvmargs.common=\
|
||||||
-server \
|
-server \
|
||||||
${test.module.imports} \
|
${test.module.imports.runtime} \
|
||||||
${run.test.jvmargs.external} \
|
${run.test.jvmargs.external} \
|
||||||
--add-modules jdk.scripting.nashorn.shell \
|
--add-modules jdk.scripting.nashorn.shell \
|
||||||
${nashorn.override.option} \
|
${nashorn.override.option} \
|
||||||
|
|
|
@ -336,6 +336,7 @@ public final class Source implements Loggable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("try")
|
||||||
protected void loadMeta() throws IOException {
|
protected void loadMeta() throws IOException {
|
||||||
if (length == 0 && lastModified == 0) {
|
if (length == 0 && lastModified == 0) {
|
||||||
final URLConnection c = url.openConnection();
|
final URLConnection c = url.openConnection();
|
||||||
|
|
|
@ -28,6 +28,7 @@ package jdk.nashorn.test.models;
|
||||||
@SuppressWarnings("javadoc")
|
@SuppressWarnings("javadoc")
|
||||||
public class ClassWithFinalFinalizer {
|
public class ClassWithFinalFinalizer {
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
protected final void finalize() {
|
protected final void finalize() {
|
||||||
//empty
|
//empty
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue