12/13/2014 - Fixed an issue with the Bytecode Decompiler. - Thanks bibl
This commit is contained in:
Kalen Kinloch 2014-12-13 17:21:25 -08:00
parent 0a81d6964d
commit 949a78b241
5 changed files with 23 additions and 16 deletions

View file

@ -14,10 +14,9 @@ FernFlower by Stiver
Procyon by Mstrobel Procyon by Mstrobel
CFR by Lee Benfield CFR by Lee Benfield
Video of Beta 1.5.2: https://the.bytecode.club/pages.php?page=bytecode-viewer Video: http://the.bytecode.club/bytecodeviewer-video/
Source Code: https://github.com/konloch/bytecode-viewer
Download the latest version here: https://github.com/Konloch/bytecode-viewer/releases if you're looking for an older copy, check out https://the.bytecode.club/bcv-archive/ Bin/Archive: https://github.com/konloch/bytecode-viewer/releases
Java Docs: https://the.bytecode.club/docs/bytecode-viewer/ Java Docs: https://the.bytecode.club/docs/bytecode-viewer/
Features: Features:
@ -176,3 +175,5 @@ Changelog:
12/13/2014 - The Bytecode Decompiler now shows the method's description in a comment. 12/13/2014 - The Bytecode Decompiler now shows the method's description in a comment.
12/13/2014 - Fixed an issue with the text search function. 12/13/2014 - Fixed an issue with the text search function.
12/13/2014 - Search results are now clickable. 12/13/2014 - Search results are now clickable.
--- 2.2.1 ---:
12/13/2014 - Fixed an issue with the Bytecode Decompiler. - Thanks bibl

View file

@ -1 +1 @@
2.2.0 2.2.1

View file

@ -208,6 +208,8 @@ import the.bytecode.club.bytecodeviewer.plugins.PluginManager;
* 12/13/2014 - The Bytecode Decompiler now shows the method's description in a comment. * 12/13/2014 - The Bytecode Decompiler now shows the method's description in a comment.
* 12/13/2014 - Fixed an issue with the text search function. * 12/13/2014 - Fixed an issue with the text search function.
* 12/13/2014 - Search results are now clickable. * 12/13/2014 - Search results are now clickable.
* -----2.2.1-----:
* 12/13/2014 - Fixed an issue with the Bytecode Decompiler. - Thanks bibl
* *
* @author Konloch * @author Konloch
* *
@ -229,7 +231,7 @@ public class BytecodeViewer {
private static ArrayList<String> recentPlugins = DiskReader.loadArrayList(pluginsName, false); private static ArrayList<String> recentPlugins = DiskReader.loadArrayList(pluginsName, false);
public static boolean runningObfuscation = false; public static boolean runningObfuscation = false;
public static String version = "2.2.0"; public static String version = "2.2.1";
public static void main(String[] args) { public static void main(String[] args) {
iconList = new ArrayList<BufferedImage>(); iconList = new ArrayList<BufferedImage>();

View file

@ -163,20 +163,21 @@ public class InstructionPrinter {
} }
protected String printFieldInsnNode(FieldInsnNode fin, ListIterator<?> it) { protected String printFieldInsnNode(FieldInsnNode fin, ListIterator<?> it) {
return nameOpcode(fin.getOpcode()) + " " + fin.owner + "." + fin.name + ":" + Type.getType(fin.desc).getClassName(); String desc = Type.getType(fin.desc).getClassName();
if(desc == null || desc.equals("null"))
desc = fin.desc;
return nameOpcode(fin.getOpcode()) + " " + fin.owner + "." + fin.name + ":" + desc;
} }
protected String printMethodInsnNode(MethodInsnNode min, ListIterator<?> it) { protected String printMethodInsnNode(MethodInsnNode min, ListIterator<?> it) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(nameOpcode(min.getOpcode()) + " " + min.owner + " " + min.name + "("); sb.append(nameOpcode(min.getOpcode()) + " " + min.owner + " " + min.name + "(");
if(Type.getType(min.desc).getClassName() == null || String desc = Type.getType(min.desc).getClassName();
Type.getType(min.desc).getClassName().equalsIgnoreCase("null")) if(desc == null || desc.equals("null"))
{ desc = min.desc;
//sb.append(min.desc); sb.append(desc);
} else {
sb.append(Type.getType(min.desc).getClassName());
}
sb.append(");"); sb.append(");");
return sb.toString(); return sb.toString();
@ -216,7 +217,10 @@ public class InstructionPrinter {
protected String printTypeInsnNode(TypeInsnNode tin) { protected String printTypeInsnNode(TypeInsnNode tin) {
try { try {
return nameOpcode(tin.getOpcode()) + " " + Type.getType(tin.desc).getClassName(); String desc = Type.getType(tin.desc).getClassName();
if(desc == null || desc.equals("null"))
desc = tin.desc;
return nameOpcode(tin.getOpcode()) + " " + desc;
} catch(Exception e) { } catch(Exception e) {
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e); new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
} }