Skip to content

Commit 17794ba

Browse files
committed
Fix issue where JavaFX UI will fail non-deterministically
1 parent 8ad7552 commit 17794ba

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/java/com/javadeobfuscator/deobfuscator/ui/FxWindow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void run() {
139139
* Load wrappers
140140
*/
141141
private void loadWrappers() {
142-
WrapperFactory.setupJarLoader(false);
142+
WrapperFactory.setupJarLoader(/* recursive */ false);
143143
deob = WrapperFactory.getDeobfuscator();
144144
trans = WrapperFactory.getTransformers();
145145
if (deob == null || trans == null) {

src/java/com/javadeobfuscator/deobfuscator/ui/wrap/WrapperFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ private static Map<String, byte[]> readClasses(File jar) throws IOException, Inv
152152
// META, which we will bundle to appease SLF4J's ServiceLoader screwery.)
153153
byte[] value = from(is);
154154
String className = new MiniClassReader(value).getClassName();
155-
if (className.contains("javadeobfuscator")) {
155+
// We know this class is in the deobfuscator jar, so if the jar does
156+
// not contain it, it is not the correct file.
157+
if (className.contains("com/javadeobfuscator/deobfuscator/Deobfuscator")) {
156158
found = true;
157159
}
158160
contents.put(className.replace("/", "."), value);

0 commit comments

Comments
 (0)