Skip to content

Commit

Permalink
Do not try to delete a global handle with the local handles APIs (#13640
Browse files Browse the repository at this point in the history
)

Motivation:

The code introduced as part of
#13480 contained a bug which could
crash the JVM. This only manifested in JDK21+ as earlier versions did
not contain the related assert.

Modifications:

Remove left-over call that could crash the JVM

Result:

Correct code that also works on JDK21
  • Loading branch information
normanmaurer committed Sep 27, 2023
1 parent 0394930 commit 2fcda07
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,6 @@ jint netty_epoll_linuxsocket_JNI_OnLoad(JNIEnv* env, const char* packagePrefix)
NETTY_JNI_UTIL_LOAD_CLASS_WEAK(env, peerCredentialsClassWeak, nettyClassName, done);
NETTY_JNI_UTIL_NEW_LOCAL_FROM_WEAK(env, peerCredentialsClass, peerCredentialsClassWeak, done);

NETTY_JNI_UTIL_LOAD_CLASS(env, peerCredentialsClass, nettyClassName, done);
netty_jni_util_free_dynamic_name(&nettyClassName);

NETTY_JNI_UTIL_GET_METHOD(env, peerCredentialsClass, peerCredentialsMethodId, "<init>", "(II[I)V", done);
Expand Down

0 comments on commit 2fcda07

Please sign in to comment.