mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
BugFix: fix getClassBytesByName cannot get class in some environments
This commit is contained in:
1 parent
41049f1852
commit
55303b7dc9
1 file changed
+1
-1
@@ -108,7 +108,7 @@ JNIEXPORT jbyteArray JNICALL Java_cn_xiaozhou233_juiceagent_api_JuiceAgent_getCl
|
||||
std::string internalName = dottedToInternal(utf);
|
||||
env->ReleaseStringUTFChars(name, utf);
|
||||
|
||||
jclass clazz = env->FindClass(internalName.c_str());
|
||||
jclass clazz = findLoadedClass(agent.getJVMTI(), env, internalName);
|
||||
if (!clazz) {
|
||||
if (env->ExceptionCheck()) env->ExceptionClear();
|
||||
spdlog::error("[bytecode] Class not found: {}", internalName);
|
||||
|
||||
Reference in new issue
Block a user