Skip to content
Permalink
Browse files

8235922: [TESTBUG]TestRecordAttrGenericSig.java and TestRecordAttr.ja…

…va are failing

Replace hard-wired JDK version 14 with mechanisms that get the latest JDK version.

Reviewed-by: dcubed
  • Loading branch information
Harold Seigel
Harold Seigel committed Dec 13, 2019
1 parent 3c0e2b4 commit 6ccfc65ec3ce9e002333f1367e17ea8bbc23eda0
@@ -143,6 +143,7 @@ public Host(int A, long B, char C) {
static final String SRC = System.getProperty("test.src");
static final String DEST = System.getProperty("test.classes");
static final boolean VERBOSE = Boolean.getBoolean("verbose");
private static final String VERSION = Integer.toString(Runtime.version().feature());

public static void main(String[] args) throws Throwable {
String origin = args[0];
@@ -271,6 +272,6 @@ static void compile(String dir) throws Throwable {
dst.toPath(),
false /* don't recurse */,
"--enable-preview",
"--source", "14");
"--source", VERSION);
}
}
@@ -34,10 +34,10 @@
* jdk.jartool/sun.tools.jar
* @compile ../NamedBuffer.java
* @run main RedefineClassHelper
* @compile --enable-preview --source 14 Host/Host.java
* @compile --enable-preview --source 14 TestRecordAttrGenericSig.java
* @compile --enable-preview --source ${jdk.version} Host/Host.java
* @compile --enable-preview --source ${jdk.version} TestRecordAttrGenericSig.java
* @run main/othervm -javaagent:redefineagent.jar -Xlog:redefine+class+record=trace --enable-preview TestRecordAttrGenericSig Host
* @compile --enable-preview --source 14 HostA/Host.java
* @compile --enable-preview --source ${jdk.version} HostA/Host.java
* @run main/othervm -javaagent:redefineagent.jar -Xlog:redefine+class+record=trace --enable-preview TestRecordAttrGenericSig HostA
*/

@@ -110,6 +110,7 @@ public int m() {
static final String SRC = System.getProperty("test.src");
static final String DEST = System.getProperty("test.classes");
static final boolean VERBOSE = Boolean.getBoolean("verbose");
private static final String VERSION = Integer.toString(Runtime.version().feature());

public static void main(String[] args) throws Throwable {
String origin = args[0];
@@ -209,6 +210,6 @@ static void compile(String dir) throws Throwable {
dst.toPath(),
false /* don't recurse */,
"--enable-preview",
"--source", "14");
"--source", VERSION);
}
}

0 comments on commit 6ccfc65

Please sign in to comment.
You can’t perform that action at this time.