Skip to content

Commit c3055d2

Browse files
committed
fix: Prevent shadow from breaking reflective code
1 parent 71dd78c commit c3055d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/deploaderStub/java/com/falsepattern/deploader/DeploaderStub.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public static void bootstrap(boolean rfb) {
118118
throw new RuntimeException("Failed to add deploader to classpath!", e);
119119
}
120120
try {
121-
Class<?> bootstrap = cl.loadClass("com.falsepattern.deploader.Bootstrap");
121+
Class<?> bootstrap = cl.loadClass("com_falsepattern_deploader_Bootstrap".replace("_", "."));
122122
Method bootstrapMethod = bootstrap.getDeclaredMethod("bootstrap", boolean.class, Path.class);
123123
bootstrapMethod.invoke(null, rfb, mcHomeDir);
124124
Method runDepLoaderMethod = bootstrap.getDeclaredMethod("runDepLoader");
@@ -203,7 +203,7 @@ static void preinit() {
203203
try {
204204
Method exc = loader.getClass()
205205
.getDeclaredMethod("addClassLoaderExclusion", String.class);
206-
exc.invoke(loader, "com.falsepattern.deploader.");
206+
exc.invoke(loader, "com_falsepattern_deploader_".replace("_", "."));
207207
} catch (Exception ignored) {}
208208
}
209209

0 commit comments

Comments
 (0)