From 641ee2d67b6cfa8e309a1e3e07578a1d862a5bcf Mon Sep 17 00:00:00 2001 From: Josef Eisl Date: Tue, 12 Dec 2023 15:35:46 +0100 Subject: [PATCH 1/2] Revert "vm/ci: add DisableSubstitutionReturnTypeCheck option to quarkus benchmarks [GR-48152]" This reverts commit d73a31055b9a6a63d257b1c67c52a52be1c30d20. --- java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py b/java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py index e2ef50afe467..769e248b3de5 100644 --- a/java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py +++ b/java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py @@ -347,7 +347,6 @@ def extra_image_build_argument(self, benchmark, args): '-H:+AllowFoldMethods', '-H:-UseServiceLoaderFeature', '-H:+AllowDeprecatedBuilderClassesOnImageClasspath', # needs to be removed once GR-41746 is fixed - '-H:+DisableSubstitutionReturnTypeCheck', # remove once Quarkus fixed their substitutions (GR-48152) ]) + super(BaseQuarkusBenchmarkSuite, self).extra_image_build_argument(benchmark, args) From a4e914f8cd1dde32e89148b5ce55fdba525e738f Mon Sep 17 00:00:00 2001 From: Josef Eisl Date: Tue, 12 Dec 2023 15:36:40 +0100 Subject: [PATCH 2/2] Revert "svm: add DisableSubstitutionReturnTypeCheck option [GR-48152]" This reverts commit d01ff88512e0bc6682cce1ef0912a2678f59c5e5. --- .../src/com/oracle/svm/hosted/NativeImageOptions.java | 3 --- .../svm/hosted/substitute/AnnotationSubstitutionProcessor.java | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageOptions.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageOptions.java index 56cd319598a5..10f0ee1798a3 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageOptions.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageOptions.java @@ -150,9 +150,6 @@ protected void onValueUpdate(EconomicMap, Object> values, Boolean o @Option(help = "Deprecated", type = User)// static final HostedOptionKey AllowIncompleteClasspath = new HostedOptionKey<>(false); - @Option(help = "Disable substitution return type checking", type = Debug, deprecated = true, stability = OptionStability.EXPERIMENTAL, deprecationMessage = "This option will be removed soon and the return type check will be mandatory.")// - public static final HostedOptionKey DisableSubstitutionReturnTypeCheck = new HostedOptionKey<>(false); - @SuppressWarnings("all") private static boolean areAssertionsEnabled() { boolean assertsEnabled = false; diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/substitute/AnnotationSubstitutionProcessor.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/substitute/AnnotationSubstitutionProcessor.java index 8970ee6efc23..5d5e98b49f2d 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/substitute/AnnotationSubstitutionProcessor.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/substitute/AnnotationSubstitutionProcessor.java @@ -861,8 +861,7 @@ private ResolvedJavaMethod findOriginalMethod(Executable annotatedMethod, Class< Method originalMethod = originalClass.getDeclaredMethod(originalName, originalParams); guarantee(Modifier.isStatic(annotatedMethod.getModifiers()) == Modifier.isStatic(originalMethod.getModifiers()), "Static modifier mismatch: %s, %s", annotatedMethod, originalMethod); - - guarantee(NativeImageOptions.DisableSubstitutionReturnTypeCheck.getValue() || getTargetClass(((Method) annotatedMethod).getReturnType()).equals(originalMethod.getReturnType()), + guarantee(getTargetClass(((Method) annotatedMethod).getReturnType()).equals(originalMethod.getReturnType()), "Return type mismatch:%n %s%n %s", annotatedMethod, originalMethod); return metaAccess.lookupJavaMethod(originalMethod);