Skip to content

Commit

Permalink
fix api usage
Browse files Browse the repository at this point in the history
  • Loading branch information
GraxCode committed May 16, 2020
1 parent 699738a commit 665459d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/me/nov/threadtear/decompiler/CFRBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,14 @@ public String getPossiblyRenamedPath(String path) {

@Override
public Pair<byte[], String> getClassFileContent(String path) throws IOException {
String name = path.substring(0, path.length() - 6);
if (name.equals(name)) {
return Pair.make(bytes, name);
String clzName = path.substring(0, path.length() - 6);
if (clzName.equals(name)) {
return Pair.make(bytes, clzName);
}
// cfr loads unnecessary classes. normally you should throw a FNF exception here, but this way, no long comment at the top of the code is created
ClassNode dummy = new ClassNode();
dummy.name = name;
dummy.name = clzName;
dummy.version = 52;
return Pair.make(Conversion.toBytecode0(dummy), name);
return Pair.make(Conversion.toBytecode0(dummy), clzName);
}

@Override
Expand Down
1 change: 0 additions & 1 deletion src/me/nov/threadtear/swing/tree/ClassTreePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.util.*;
import java.util.List;
import java.util.jar.JarEntry;
import java.util.stream.Stream;

import javax.swing.*;
import javax.swing.tree.*;
Expand Down

0 comments on commit 665459d

Please sign in to comment.