mirror of
https://github.com/revanced/Apktool.git
synced 2025-06-12 13:17:43 +02:00
Code cleanups
This commit is contained in:
@ -45,7 +45,7 @@ public abstract class TestUtils {
|
||||
|
||||
int eventType;
|
||||
String key = null;
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
while ((eventType = xpp.next()) != XmlPullParser.END_DOCUMENT) {
|
||||
switch (eventType) {
|
||||
case XmlPullParser.START_TAG:
|
||||
@ -78,14 +78,14 @@ public abstract class TestUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void copyResourceDir(Class class_, String dirPath, File out) throws BrutException {
|
||||
public static void copyResourceDir(Class<?> class_, String dirPath, File out) throws BrutException {
|
||||
if (!out.exists()) {
|
||||
out.mkdirs();
|
||||
}
|
||||
copyResourceDir(class_, dirPath, new FileDirectory(out));
|
||||
}
|
||||
|
||||
public static void copyResourceDir(Class class_, String dirPath, Directory out) throws BrutException {
|
||||
public static void copyResourceDir(Class<?> class_, String dirPath, Directory out) throws BrutException {
|
||||
if (class_ == null) {
|
||||
class_ = Class.class;
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ public class BuildAndDecodeTest extends BaseTest {
|
||||
public void storedMp3FilesAreNotCompressedTest() throws BrutException {
|
||||
ExtFile extFile = new ExtFile(sTmpDir, "testapp.apk");
|
||||
Integer built = extFile.getDirectory().getCompressionLevel("res/raw/rain.mp3");
|
||||
assertEquals(new Integer(0), built);
|
||||
assertEquals(Integer.valueOf(0), built);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -79,7 +79,7 @@ public class UnknownCompressionTest extends BaseTest {
|
||||
// Check that control = rebuilt (both stored)
|
||||
// Add extra check for checking = 0 to enforce check for stored just in case control breaks
|
||||
assertEquals(control, rebuilt);
|
||||
assertEquals(new Integer(0), rebuilt);
|
||||
assertEquals(Integer.valueOf(0), rebuilt);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -88,7 +88,7 @@ public class UnknownCompressionTest extends BaseTest {
|
||||
Integer rebuilt = sTestNewDir.getDirectory().getCompressionLevel("test.json");
|
||||
|
||||
assertEquals(control, rebuilt);
|
||||
assertEquals(new Integer(8), rebuilt);
|
||||
assertEquals(Integer.valueOf(8), rebuilt);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -97,6 +97,6 @@ public class UnknownCompressionTest extends BaseTest {
|
||||
Integer rebuilt = sTestNewDir.getDirectory().getCompressionLevel("950x150.png");
|
||||
|
||||
assertEquals(control, rebuilt);
|
||||
assertEquals(new Integer(8), rebuilt);
|
||||
assertEquals(Integer.valueOf(8), rebuilt);
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ import java.nio.file.Paths;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class DecodeKotlinCoroutinesTest extends BaseTest {
|
||||
private static String apk = "test-kotlin-coroutines.apk";
|
||||
private static final String apk = "test-kotlin-coroutines.apk";
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
|
Reference in New Issue
Block a user