Skip to content

Commit

Permalink
Avoid depending on ClassUtils.getClass
Browse files Browse the repository at this point in the history
Might cause class conflicts when target APP also uses ClassUtils.
Fix for LSPatch.
  • Loading branch information
JingMatrix committed Jan 7, 2024
1 parent df74d83 commit f3beb86
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public static Class<?> findClass(String className, ClassLoader classLoader) {
if (classLoader == null)
classLoader = XposedBridge.BOOTCLASSLOADER;
try {
return ClassUtils.getClass(classLoader, className, false);
return classLoader.loadClass(className);
} catch (ClassNotFoundException e) {
throw new ClassNotFoundError(e);
}
Expand Down

2 comments on commit f3beb86

@Dev4Mod
Copy link

@Dev4Mod Dev4Mod commented on f3beb86 Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't doing a loadClass before checking if the class is primitive cause problems?
Example:

XposedHelpers.findClass("int",classloader);

ClassUtils handled this type of class

@JingMatrix
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I will revert this commit and use a local version of ClassUtils.

Please sign in to comment.