< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyCallerSensitiveMethods.java
Print this page
@@ -65,11 +65,11 @@
throw new AssertionError(e);
}
}
@Override
- protected boolean verify(StructuredGraph graph, PhaseContext context) {
+ protected void verify(StructuredGraph graph, PhaseContext context) {
Invoke invoke = callsReflectionGetCallerClass(graph, context);
Annotation annotation = graph.method().getAnnotation(callerSensitiveClass);
if (invoke != null) {
if (annotation == null) {
StackTraceElement e = graph.method().asStackTraceElement(invoke.bci());
@@ -77,11 +77,10 @@
}
} else if (annotation != null) {
throw new VerificationError(String.format("%s: method annotated with @CallerSensitive does not call Reflection.getCallerClass()", graph.method().format("%H.%n(%p)")));
}
- return true;
}
private Invoke callsReflectionGetCallerClass(StructuredGraph graph, PhaseContext context) {
ResolvedJavaType reflectionType = context.getMetaAccess().lookupJavaType(reflectionClass);
for (MethodCallTargetNode t : graph.getNodes(MethodCallTargetNode.TYPE)) {
< prev index next >