From 0ea992a5f84fd3dd2e9501ced573be6ab6825bd9 Mon Sep 17 00:00:00 2001 From: Peter Hofer Date: Fri, 9 Aug 2019 17:46:20 +0200 Subject: [PATCH] Fix agent warning for getEnclosingMethod returning null. --- .../src/com/oracle/svm/agent/BreakpointInterceptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substratevm/src/com.oracle.svm.agent/src/com/oracle/svm/agent/BreakpointInterceptor.java b/substratevm/src/com.oracle.svm.agent/src/com/oracle/svm/agent/BreakpointInterceptor.java index 9327f77b080f..dac9d58f9c2e 100644 --- a/substratevm/src/com.oracle.svm.agent/src/com/oracle/svm/agent/BreakpointInterceptor.java +++ b/substratevm/src/com.oracle.svm.agent/src/com/oracle/svm/agent/BreakpointInterceptor.java @@ -464,7 +464,7 @@ private static boolean getEnclosingMethod(JNIEnvironment jni, JNIObjectHandle ca } } boolean allowed = enclosing.equal(nullHandle()) || accessVerifier == null || accessVerifier.verifyGetEnclosingMethod(jni, holder, name, signature, enclosing, callerClass); - traceBreakpoint(jni, nullHandle(), nullHandle(), callerClass, bp.specification.methodName, allowed ? result : false); + traceBreakpoint(jni, nullHandle(), nullHandle(), callerClass, bp.specification.methodName, (allowed && enclosing.notEqual(nullHandle())) ? result : false); if (!allowed) { jvmtiFunctions().ForceEarlyReturnObject().invoke(jvmtiEnv(), nullHandle(), nullHandle()); }