java-decompiler: fixes and cleanups

- console decompiler: resource closing, lookup instead of scan, error reporting
- logger interface reworked
- saver interface renamed
- bytecode provider returns byte array (to reduce stream leakage)
- extra level of context unit avoided
- unneeded exceptions, dead code, formatting
This commit is contained in:
Roman Shevchenko
2014-09-05 13:12:40 +04:00
parent 4e79d160ca
commit ff382a6fdf
28 changed files with 494 additions and 684 deletions

View File

@@ -21,7 +21,6 @@ import org.jetbrains.java.decompiler.struct.consts.ConstantPool;
import org.jetbrains.java.decompiler.util.DataInputFullStream;
import org.jetbrains.java.decompiler.util.VBStyleCollection;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -106,7 +105,7 @@ public class StructMethod extends StructMember {
public void expandData() throws IOException {
if (containsCode && !expanded) {
byte[] code = classStruct.getLoader().loadBytecode(this, codeFullLength);
seq = parseBytecode(new DataInputFullStream(new ByteArrayInputStream(code)), codeLength, classStruct.getPool());
seq = parseBytecode(new DataInputFullStream(code), codeLength, classStruct.getPool());
expanded = true;
}
}