8314250: CDS dump error message: Invoker type parameter must start and end with Object: L3I_L
Reviewed-by: iklam, matsaave
This commit is contained in:
parent
0a6e64e2f5
commit
41450e9405
src/java.base/share/classes/java/lang/invoke
test/hotspot/jtreg/runtime/cds/appcds
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2024, 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
|
||||
@ -28,6 +28,7 @@ package java.lang.invoke;
|
||||
import jdk.internal.org.objectweb.asm.ClassWriter;
|
||||
import jdk.internal.org.objectweb.asm.Opcodes;
|
||||
import sun.invoke.util.Wrapper;
|
||||
import sun.util.logging.PlatformLogger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
@ -136,9 +137,7 @@ class GenerateJLIClassesHelper {
|
||||
for (String invokerType : invokerTypes) {
|
||||
MethodType mt = asMethodType(invokerType);
|
||||
final int lastParam = mt.parameterCount() - 1;
|
||||
if (mt.parameterCount() < 2 ||
|
||||
mt.parameterType(0) != Object.class ||
|
||||
mt.parameterType(lastParam) != Object.class) {
|
||||
if (!checkInvokerTypeParams(mt)) {
|
||||
throw new RuntimeException(
|
||||
"Invoker type parameter must start and end with Object: " + invokerType);
|
||||
}
|
||||
@ -190,7 +189,7 @@ class GenerateJLIClassesHelper {
|
||||
return result;
|
||||
}
|
||||
|
||||
private static MethodType asMethodType(String basicSignatureString) {
|
||||
public static MethodType asMethodType(String basicSignatureString) {
|
||||
String[] parts = basicSignatureString.split("_");
|
||||
assert (parts.length == 2);
|
||||
assert (parts[1].length() == 1);
|
||||
@ -207,6 +206,13 @@ class GenerateJLIClassesHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean checkInvokerTypeParams(MethodType mt) {
|
||||
final int lastParam = mt.parameterCount() - 1;
|
||||
return (mt.parameterCount() >= 2 &&
|
||||
mt.parameterType(0) == Object.class &&
|
||||
mt.parameterType(lastParam) == Object.class);
|
||||
}
|
||||
|
||||
private void addDMHMethodType(String dmh, String methodType) {
|
||||
validateMethodType(methodType);
|
||||
Set<String> methodTypes = dmhMethods.get(dmh);
|
||||
@ -315,7 +321,14 @@ class GenerateJLIClassesHelper {
|
||||
"linkToCallSite".equals(parts[2])) {
|
||||
builder.addCallSiteType(methodType);
|
||||
} else {
|
||||
builder.addInvokerType(methodType);
|
||||
MethodType mt = HolderClassBuilder.asMethodType(methodType);
|
||||
// Work around JDK-8327499
|
||||
if (HolderClassBuilder.checkInvokerTypeParams(mt)) {
|
||||
builder.addInvokerType(methodType);
|
||||
} else {
|
||||
PlatformLogger.getLogger("java.lang.invoke")
|
||||
.warning("Invalid LF_RESOLVE " + parts[1] + " " + parts[2] + " " + parts[3]);
|
||||
}
|
||||
}
|
||||
} else if (parts[1].contains("DirectMethodHandle")) {
|
||||
String dmh = parts[2];
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2024, 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
|
||||
@ -31,7 +31,7 @@ do
|
||||
fname="$i$name_suffix"
|
||||
cat << EOF > $fname
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -81,6 +81,7 @@ import org.junit.Test;
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class $i extends DynamicArchiveTestBase {
|
||||
@Test
|
||||
@ -98,6 +99,12 @@ public class $i extends DynamicArchiveTestBase {
|
||||
private static final String lambdaLoadedFromArchive =
|
||||
".class.load. test.java.lang.invoke.$i[$][$]Lambda.*/0x.*source:.*shared.*objects.*file.*(top)";
|
||||
|
||||
static void checkError(OutputAnalyzer output) throws Exception {
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Was the base archive generated with an outdated classlist?");
|
||||
}
|
||||
}
|
||||
|
||||
static void testImpl() throws Exception {
|
||||
String topArchiveName = getNewArchiveName();
|
||||
String appJar = JarBuilder.build("MH", new File(classDir), null);
|
||||
@ -111,6 +118,7 @@ public class $i extends DynamicArchiveTestBase {
|
||||
String className = testPackageName + "." + testClassName;
|
||||
|
||||
dump(topArchiveName, loggingOpts, "-cp", jars, verifyOpt, mainClass, className)
|
||||
.assertNormalExit(output -> checkError(output))
|
||||
.assertNormalExit(output -> {
|
||||
output.shouldContain("Written dynamic archive 0x");
|
||||
});
|
||||
|
12
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesAsCollectorTest.java
12
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesAsCollectorTest.java
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -49,6 +49,7 @@ import org.junit.Test;
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class MethodHandlesAsCollectorTest extends DynamicArchiveTestBase {
|
||||
@Test
|
||||
@ -66,6 +67,12 @@ public class MethodHandlesAsCollectorTest extends DynamicArchiveTestBase {
|
||||
private static final String lambdaLoadedFromArchive =
|
||||
".class.load. test.java.lang.invoke.MethodHandlesAsCollectorTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file.*(top)";
|
||||
|
||||
static void checkError(OutputAnalyzer output) throws Exception {
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Was the base archive generated with an outdated classlist?");
|
||||
}
|
||||
}
|
||||
|
||||
static void testImpl() throws Exception {
|
||||
String topArchiveName = getNewArchiveName();
|
||||
String appJar = JarBuilder.build("MH", new File(classDir), null);
|
||||
@ -79,6 +86,7 @@ public class MethodHandlesAsCollectorTest extends DynamicArchiveTestBase {
|
||||
String className = testPackageName + "." + testClassName;
|
||||
|
||||
dump(topArchiveName, loggingOpts, "-cp", jars, verifyOpt, mainClass, className)
|
||||
.assertNormalExit(output -> checkError(output))
|
||||
.assertNormalExit(output -> {
|
||||
output.shouldContain("Written dynamic archive 0x");
|
||||
});
|
||||
|
12
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesCastFailureTest.java
12
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesCastFailureTest.java
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -49,6 +49,7 @@ import org.junit.Test;
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class MethodHandlesCastFailureTest extends DynamicArchiveTestBase {
|
||||
@Test
|
||||
@ -66,6 +67,12 @@ public class MethodHandlesCastFailureTest extends DynamicArchiveTestBase {
|
||||
private static final String lambdaLoadedFromArchive =
|
||||
".class.load. test.java.lang.invoke.MethodHandlesCastFailureTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file.*(top)";
|
||||
|
||||
static void checkError(OutputAnalyzer output) throws Exception {
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Was the base archive generated with an outdated classlist?");
|
||||
}
|
||||
}
|
||||
|
||||
static void testImpl() throws Exception {
|
||||
String topArchiveName = getNewArchiveName();
|
||||
String appJar = JarBuilder.build("MH", new File(classDir), null);
|
||||
@ -79,6 +86,7 @@ public class MethodHandlesCastFailureTest extends DynamicArchiveTestBase {
|
||||
String className = testPackageName + "." + testClassName;
|
||||
|
||||
dump(topArchiveName, loggingOpts, "-cp", jars, verifyOpt, mainClass, className)
|
||||
.assertNormalExit(output -> checkError(output))
|
||||
.assertNormalExit(output -> {
|
||||
output.shouldContain("Written dynamic archive 0x");
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -49,6 +49,7 @@ import org.junit.Test;
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class MethodHandlesGeneralTest extends DynamicArchiveTestBase {
|
||||
@Test
|
||||
@ -66,6 +67,12 @@ public class MethodHandlesGeneralTest extends DynamicArchiveTestBase {
|
||||
private static final String lambdaLoadedFromArchive =
|
||||
".class.load. test.java.lang.invoke.MethodHandlesGeneralTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file.*(top)";
|
||||
|
||||
static void checkError(OutputAnalyzer output) throws Exception {
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Was the base archive generated with an outdated classlist?");
|
||||
}
|
||||
}
|
||||
|
||||
static void testImpl() throws Exception {
|
||||
String topArchiveName = getNewArchiveName();
|
||||
String appJar = JarBuilder.build("MH", new File(classDir), null);
|
||||
@ -79,6 +86,7 @@ public class MethodHandlesGeneralTest extends DynamicArchiveTestBase {
|
||||
String className = testPackageName + "." + testClassName;
|
||||
|
||||
dump(topArchiveName, loggingOpts, "-cp", jars, verifyOpt, mainClass, className)
|
||||
.assertNormalExit(output -> checkError(output))
|
||||
.assertNormalExit(output -> {
|
||||
output.shouldContain("Written dynamic archive 0x");
|
||||
});
|
||||
|
12
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesInvokersTest.java
12
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesInvokersTest.java
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -49,6 +49,7 @@ import org.junit.Test;
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class MethodHandlesInvokersTest extends DynamicArchiveTestBase {
|
||||
@Test
|
||||
@ -66,6 +67,12 @@ public class MethodHandlesInvokersTest extends DynamicArchiveTestBase {
|
||||
private static final String lambdaLoadedFromArchive =
|
||||
".class.load. test.java.lang.invoke.MethodHandlesInvokersTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file.*(top)";
|
||||
|
||||
static void checkError(OutputAnalyzer output) throws Exception {
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Was the base archive generated with an outdated classlist?");
|
||||
}
|
||||
}
|
||||
|
||||
static void testImpl() throws Exception {
|
||||
String topArchiveName = getNewArchiveName();
|
||||
String appJar = JarBuilder.build("MH", new File(classDir), null);
|
||||
@ -79,6 +86,7 @@ public class MethodHandlesInvokersTest extends DynamicArchiveTestBase {
|
||||
String className = testPackageName + "." + testClassName;
|
||||
|
||||
dump(topArchiveName, loggingOpts, "-cp", jars, verifyOpt, mainClass, className)
|
||||
.assertNormalExit(output -> checkError(output))
|
||||
.assertNormalExit(output -> {
|
||||
output.shouldContain("Written dynamic archive 0x");
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -49,6 +49,7 @@ import org.junit.Test;
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class MethodHandlesPermuteArgumentsTest extends DynamicArchiveTestBase {
|
||||
@Test
|
||||
@ -66,6 +67,12 @@ public class MethodHandlesPermuteArgumentsTest extends DynamicArchiveTestBase {
|
||||
private static final String lambdaLoadedFromArchive =
|
||||
".class.load. test.java.lang.invoke.MethodHandlesPermuteArgumentsTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file.*(top)";
|
||||
|
||||
static void checkError(OutputAnalyzer output) throws Exception {
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Was the base archive generated with an outdated classlist?");
|
||||
}
|
||||
}
|
||||
|
||||
static void testImpl() throws Exception {
|
||||
String topArchiveName = getNewArchiveName();
|
||||
String appJar = JarBuilder.build("MH", new File(classDir), null);
|
||||
@ -79,6 +86,7 @@ public class MethodHandlesPermuteArgumentsTest extends DynamicArchiveTestBase {
|
||||
String className = testPackageName + "." + testClassName;
|
||||
|
||||
dump(topArchiveName, loggingOpts, "-cp", jars, verifyOpt, mainClass, className)
|
||||
.assertNormalExit(output -> checkError(output))
|
||||
.assertNormalExit(output -> {
|
||||
output.shouldContain("Written dynamic archive 0x");
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -49,6 +49,7 @@ import org.junit.Test;
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class MethodHandlesSpreadArgumentsTest extends DynamicArchiveTestBase {
|
||||
@Test
|
||||
@ -66,6 +67,12 @@ public class MethodHandlesSpreadArgumentsTest extends DynamicArchiveTestBase {
|
||||
private static final String lambdaLoadedFromArchive =
|
||||
".class.load. test.java.lang.invoke.MethodHandlesSpreadArgumentsTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file.*(top)";
|
||||
|
||||
static void checkError(OutputAnalyzer output) throws Exception {
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Was the base archive generated with an outdated classlist?");
|
||||
}
|
||||
}
|
||||
|
||||
static void testImpl() throws Exception {
|
||||
String topArchiveName = getNewArchiveName();
|
||||
String appJar = JarBuilder.build("MH", new File(classDir), null);
|
||||
@ -79,6 +86,7 @@ public class MethodHandlesSpreadArgumentsTest extends DynamicArchiveTestBase {
|
||||
String className = testPackageName + "." + testClassName;
|
||||
|
||||
dump(topArchiveName, loggingOpts, "-cp", jars, verifyOpt, mainClass, className)
|
||||
.assertNormalExit(output -> checkError(output))
|
||||
.assertNormalExit(output -> {
|
||||
output.shouldContain("Written dynamic archive 0x");
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2024, 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
|
||||
@ -31,7 +31,7 @@ do
|
||||
fname="$i$name_suffix"
|
||||
cat << EOF > $fname
|
||||
/*
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -121,7 +121,10 @@ public class $i {
|
||||
"-cp", jars,
|
||||
"-Xlog:class+load,cds")
|
||||
.setArchiveName(archiveName);
|
||||
CDSTestUtils.createArchiveAndCheck(opts);
|
||||
OutputAnalyzer output = CDSTestUtils.createArchiveAndCheck(opts);
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Is your classlist out of date?");
|
||||
}
|
||||
|
||||
// run with archive
|
||||
CDSOptions runOpts = (new CDSOptions())
|
||||
@ -129,7 +132,7 @@ public class $i {
|
||||
.setArchiveName(archiveName)
|
||||
.setUseVersion(false)
|
||||
.addSuffix(mainClass, testPackageName + "." + testClassName);
|
||||
OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output.shouldMatch(".class.load. test.java.lang.invoke.$i[$][$]Lambda.*/0x.*source:.*shared.*objects.*file")
|
||||
.shouldHaveExitValue(0);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -89,7 +89,10 @@ public class MethodHandlesAsCollectorTest {
|
||||
"-cp", jars,
|
||||
"-Xlog:class+load,cds")
|
||||
.setArchiveName(archiveName);
|
||||
CDSTestUtils.createArchiveAndCheck(opts);
|
||||
OutputAnalyzer output = CDSTestUtils.createArchiveAndCheck(opts);
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Is your classlist out of date?");
|
||||
}
|
||||
|
||||
// run with archive
|
||||
CDSOptions runOpts = (new CDSOptions())
|
||||
@ -97,7 +100,7 @@ public class MethodHandlesAsCollectorTest {
|
||||
.setArchiveName(archiveName)
|
||||
.setUseVersion(false)
|
||||
.addSuffix(mainClass, testPackageName + "." + testClassName);
|
||||
OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output.shouldMatch(".class.load. test.java.lang.invoke.MethodHandlesAsCollectorTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file")
|
||||
.shouldHaveExitValue(0);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -89,7 +89,10 @@ public class MethodHandlesCastFailureTest {
|
||||
"-cp", jars,
|
||||
"-Xlog:class+load,cds")
|
||||
.setArchiveName(archiveName);
|
||||
CDSTestUtils.createArchiveAndCheck(opts);
|
||||
OutputAnalyzer output = CDSTestUtils.createArchiveAndCheck(opts);
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Is your classlist out of date?");
|
||||
}
|
||||
|
||||
// run with archive
|
||||
CDSOptions runOpts = (new CDSOptions())
|
||||
@ -97,7 +100,7 @@ public class MethodHandlesCastFailureTest {
|
||||
.setArchiveName(archiveName)
|
||||
.setUseVersion(false)
|
||||
.addSuffix(mainClass, testPackageName + "." + testClassName);
|
||||
OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output.shouldMatch(".class.load. test.java.lang.invoke.MethodHandlesCastFailureTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file")
|
||||
.shouldHaveExitValue(0);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -89,7 +89,10 @@ public class MethodHandlesGeneralTest {
|
||||
"-cp", jars,
|
||||
"-Xlog:class+load,cds")
|
||||
.setArchiveName(archiveName);
|
||||
CDSTestUtils.createArchiveAndCheck(opts);
|
||||
OutputAnalyzer output = CDSTestUtils.createArchiveAndCheck(opts);
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Is your classlist out of date?");
|
||||
}
|
||||
|
||||
// run with archive
|
||||
CDSOptions runOpts = (new CDSOptions())
|
||||
@ -97,7 +100,7 @@ public class MethodHandlesGeneralTest {
|
||||
.setArchiveName(archiveName)
|
||||
.setUseVersion(false)
|
||||
.addSuffix(mainClass, testPackageName + "." + testClassName);
|
||||
OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output.shouldMatch(".class.load. test.java.lang.invoke.MethodHandlesGeneralTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file")
|
||||
.shouldHaveExitValue(0);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -89,7 +89,10 @@ public class MethodHandlesInvokersTest {
|
||||
"-cp", jars,
|
||||
"-Xlog:class+load,cds")
|
||||
.setArchiveName(archiveName);
|
||||
CDSTestUtils.createArchiveAndCheck(opts);
|
||||
OutputAnalyzer output = CDSTestUtils.createArchiveAndCheck(opts);
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Is your classlist out of date?");
|
||||
}
|
||||
|
||||
// run with archive
|
||||
CDSOptions runOpts = (new CDSOptions())
|
||||
@ -97,7 +100,7 @@ public class MethodHandlesInvokersTest {
|
||||
.setArchiveName(archiveName)
|
||||
.setUseVersion(false)
|
||||
.addSuffix(mainClass, testPackageName + "." + testClassName);
|
||||
OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output.shouldMatch(".class.load. test.java.lang.invoke.MethodHandlesInvokersTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file")
|
||||
.shouldHaveExitValue(0);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -89,7 +89,10 @@ public class MethodHandlesPermuteArgumentsTest {
|
||||
"-cp", jars,
|
||||
"-Xlog:class+load,cds")
|
||||
.setArchiveName(archiveName);
|
||||
CDSTestUtils.createArchiveAndCheck(opts);
|
||||
OutputAnalyzer output = CDSTestUtils.createArchiveAndCheck(opts);
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Is your classlist out of date?");
|
||||
}
|
||||
|
||||
// run with archive
|
||||
CDSOptions runOpts = (new CDSOptions())
|
||||
@ -97,7 +100,7 @@ public class MethodHandlesPermuteArgumentsTest {
|
||||
.setArchiveName(archiveName)
|
||||
.setUseVersion(false)
|
||||
.addSuffix(mainClass, testPackageName + "." + testClassName);
|
||||
OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output.shouldMatch(".class.load. test.java.lang.invoke.MethodHandlesPermuteArgumentsTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file")
|
||||
.shouldHaveExitValue(0);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
// this file is auto-generated by ./CDSMHTest_generate.sh. Do not edit manually.
|
||||
// this file is auto-generated by CDSMHTest_generate.sh. Do not edit manually.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -89,7 +89,10 @@ public class MethodHandlesSpreadArgumentsTest {
|
||||
"-cp", jars,
|
||||
"-Xlog:class+load,cds")
|
||||
.setArchiveName(archiveName);
|
||||
CDSTestUtils.createArchiveAndCheck(opts);
|
||||
OutputAnalyzer output = CDSTestUtils.createArchiveAndCheck(opts);
|
||||
if (testClassName.equals("MethodHandlesInvokersTest")) {
|
||||
output.shouldNotContain("Failed to generate LambdaForm holder classes. Is your classlist out of date?");
|
||||
}
|
||||
|
||||
// run with archive
|
||||
CDSOptions runOpts = (new CDSOptions())
|
||||
@ -97,7 +100,7 @@ public class MethodHandlesSpreadArgumentsTest {
|
||||
.setArchiveName(archiveName)
|
||||
.setUseVersion(false)
|
||||
.addSuffix(mainClass, testPackageName + "." + testClassName);
|
||||
OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output = CDSTestUtils.runWithArchive(runOpts);
|
||||
output.shouldMatch(".class.load. test.java.lang.invoke.MethodHandlesSpreadArgumentsTest[$][$]Lambda.*/0x.*source:.*shared.*objects.*file")
|
||||
.shouldHaveExitValue(0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user