From 959cb5fd4f9586ec3bd265b452fe25fe1db82e3f Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 13 Jan 2015 23:25:04 -0500 Subject: source format change don't hate me too much if you were planning a big merge. =P --- test/cuchaz/enigma/TestSourceIndex.java | 36 +++++++++++++-------------------- 1 file changed, 14 insertions(+), 22 deletions(-) (limited to 'test/cuchaz/enigma/TestSourceIndex.java') diff --git a/test/cuchaz/enigma/TestSourceIndex.java b/test/cuchaz/enigma/TestSourceIndex.java index dc6ca7e..fb385e0 100644 --- a/test/cuchaz/enigma/TestSourceIndex.java +++ b/test/cuchaz/enigma/TestSourceIndex.java @@ -21,35 +21,27 @@ import com.strobel.decompiler.languages.java.ast.CompilationUnit; import cuchaz.enigma.mapping.ClassEntry; -public class TestSourceIndex -{ +public class TestSourceIndex { + @Test - public void indexEverything( ) - throws Exception - { - Deobfuscator deobfuscator = new Deobfuscator( new File( "input/1.8.jar" ) ); + public void indexEverything() throws Exception { + Deobfuscator deobfuscator = new Deobfuscator(new File("input/1.8.jar")); // get all classes that aren't inner classes Set classEntries = Sets.newHashSet(); - for( ClassEntry obfClassEntry : deobfuscator.getJarIndex().getObfClassEntries() ) - { - if( !obfClassEntry.isInnerClass() ) - { - classEntries.add( obfClassEntry ); + for (ClassEntry obfClassEntry : deobfuscator.getJarIndex().getObfClassEntries()) { + if (!obfClassEntry.isInnerClass()) { + classEntries.add(obfClassEntry); } } - for( ClassEntry obfClassEntry : classEntries ) - { - try - { - CompilationUnit tree = deobfuscator.getSourceTree( obfClassEntry.getName() ); - String source = deobfuscator.getSource( tree ); - deobfuscator.getSourceIndex( tree, source ); - } - catch( Throwable t ) - { - throw new Error( "Unable to index " + obfClassEntry, t ); + for (ClassEntry obfClassEntry : classEntries) { + try { + CompilationUnit tree = deobfuscator.getSourceTree(obfClassEntry.getName()); + String source = deobfuscator.getSource(tree); + deobfuscator.getSourceIndex(tree, source); + } catch (Throwable t) { + throw new Error("Unable to index " + obfClassEntry, t); } } } -- cgit v1.2.3