Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GR-48152] Remove DisableSubstitutionReturnTypeCheck option #8010

Merged
merged 2 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, Boolean o
@Option(help = "Deprecated", type = User)//
static final HostedOptionKey<Boolean> 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<Boolean> DisableSubstitutionReturnTypeCheck = new HostedOptionKey<>(false);

@SuppressWarnings("all")
private static boolean areAssertionsEnabled() {
boolean assertsEnabled = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down