injector: saveJar -> save, finish main cleanup

This commit is contained in:
TheRealNull
2021-01-02 04:45:43 -05:00
parent cdd293a865
commit de95668590
32 changed files with 47 additions and 57 deletions

View File

@@ -137,7 +137,7 @@ public class Deob
//new MaxMemoryTransformer().transform(group);
//new RuneliteBufferTransformer().transform(group);
JarUtil.saveJar(group, new File(args[1]));
JarUtil.save(group, new File(args[1]));
stopwatch.stop();
logger.info("Done in {}", stopwatch);

View File

@@ -82,7 +82,7 @@ public class UpdateMappings
public void save(File out) throws IOException
{
JarUtil.saveJar(group2, out);
JarUtil.save(group2, out);
}
public static void main(String[] args) throws IOException

View File

@@ -119,7 +119,7 @@ public class JarUtil
return group;
}
public static void saveJar(ClassGroup group, File jarfile)
public static void save(ClassGroup group, File jarfile)
{
try (JarOutputStream jout = new JarOutputStream(new FileOutputStream(jarfile)))
{

View File

@@ -47,7 +47,7 @@ public class ClassFileVisitorTest
{
ClassGroup group = JarUtil.load(new File(properties.getVanillaClient()));
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
}

View File

@@ -56,7 +56,7 @@ public class EnumDeobfuscatorTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -56,7 +56,7 @@ public class FieldInlinerTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -56,7 +56,7 @@ public class IllegalStateExceptionsTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -56,7 +56,7 @@ public class OrderTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -56,7 +56,7 @@ public class PacketHandlerOrderTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -64,7 +64,7 @@ public class RenameUniqueTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -56,7 +56,7 @@ public class RuntimeExceptionsTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -59,7 +59,7 @@ public class UnreachedCodeTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -75,7 +75,7 @@ public class UnusedClassTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -56,7 +56,7 @@ public class UnusedFieldsTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -56,7 +56,7 @@ public class UnusedMethodsTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -56,7 +56,7 @@ public class UnusedParametersTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -57,7 +57,7 @@ public class ModArithTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -57,7 +57,7 @@ public class MultiplyZeroDeobfuscatorTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -56,7 +56,7 @@ public class ControlFlowDeobfuscatorTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -56,7 +56,7 @@ public class ConstantParameterTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -56,7 +56,7 @@ public class MenuActionDeobfuscatorTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -58,7 +58,7 @@ public class PacketWriteDeobfuscatorTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, folder.newFile());
JarUtil.save(group, folder.newFile());
}
@Test

View File

@@ -59,7 +59,7 @@ public class ClientErrorTransformerTest
{
File out = folder.newFile();
JarUtil.saveJar(group, out);
JarUtil.save(group, out);
logger.info("Wrote to {}", out);
}

View File

@@ -117,7 +117,7 @@ public class AnnotationCleaner
new AnnotationAdder(group).run();
JarUtil.saveJar(group, new File("C:/Users/Lucas/Desktop/niec.jar"));
JarUtil.save(group, new File("C:/Users/Lucas/Desktop/niec.jar"));
}
private static class OhNoException extends Exception

View File

@@ -54,7 +54,7 @@ public class AnnotationCopierTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group2, new File(OUT));
JarUtil.save(group2, new File(OUT));
}
//@Test

View File

@@ -48,7 +48,7 @@ public class AnnotationRenamerTest
@After
public void after() throws IOException
{
JarUtil.saveJar(group, new File(OUT));
JarUtil.save(group, new File(OUT));
}
//@Test

View File

@@ -67,7 +67,7 @@ public class UpdateMappingsTest
map(group1, group2);
JarUtil.saveJar(group2, new File(OUT));
JarUtil.save(group2, new File(OUT));
}
@Test
@@ -98,7 +98,7 @@ public class UpdateMappingsTest
new ScriptOpcodesTransformer().transform(group);
JarUtil.saveJar(group, new File("C:/Users/Lucas/Desktop/Apapapapapap.jar"));
JarUtil.save(group, new File("C:/Users/Lucas/Desktop/Apapapapapap.jar"));
}
private void unannotate(ClassGroup group)

View File

@@ -78,7 +78,7 @@ public class HookImporter
@After
public void after() throws IOException
{
JarUtil.saveJar(group, OUT);
JarUtil.save(group, OUT);
}
@Test

View File

@@ -70,7 +70,7 @@ public class MappingImporter
@After
public void after() throws IOException
{
JarUtil.saveJar(group, OUT);
JarUtil.save(group, OUT);
}
private boolean hasObfuscatedName(Annotated an, String name)

View File

@@ -87,7 +87,7 @@ public class HookImporter
public void after() throws IOException
{
File out = folder.newFile("client.jar");
JarUtil.saveJar(group, out);
JarUtil.save(group, out);
logger.info("Wrote to {}", out);
}