mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8235922: [TESTBUG]TestRecordAttrGenericSig.java and TestRecordAttr.java are failing
Replace hard-wired JDK version 14 with mechanisms that get the latest JDK version. Reviewed-by: dcubed
This commit is contained in:
parent
3c0e2b4e16
commit
6ccfc65ec3
@ -143,6 +143,7 @@ public class TestRecordAttr {
|
||||
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 @@ public class TestRecordAttr {
|
||||
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 class TestRecordAttrGenericSig {
|
||||
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 @@ public class TestRecordAttrGenericSig {
|
||||
dst.toPath(),
|
||||
false /* don't recurse */,
|
||||
"--enable-preview",
|
||||
"--source", "14");
|
||||
"--source", VERSION);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user