fix: forbid to change types for methods arguments
This commit is contained in:
@@ -56,13 +56,13 @@ public class TestTryCatchFinally6 extends IntegrationTest {
|
||||
String code = cls.getCode().toString();
|
||||
|
||||
assertThat(code, containsLines(2,
|
||||
"FileInputStream fileInputStream = null;",
|
||||
"InputStream inputStream = null;",
|
||||
"try {",
|
||||
indent() + "call();",
|
||||
indent() + "fileInputStream = new FileInputStream(\"1.txt\");",
|
||||
indent() + "inputStream = new FileInputStream(\"1.txt\");",
|
||||
"} finally {",
|
||||
indent() + "if (fileInputStream != null) {",
|
||||
indent() + indent() + "fileInputStream.close();",
|
||||
indent() + "if (inputStream != null) {",
|
||||
indent() + indent() + "inputStream.close();",
|
||||
indent() + "}",
|
||||
"}"
|
||||
));
|
||||
|
||||
@@ -24,7 +24,7 @@ public class TestVariablesGeneric extends SmaliTest {
|
||||
@Test
|
||||
public void test() {
|
||||
disableCompilation();
|
||||
ClassNode cls = getClassNodeFromSmaliWithPath("variables", "TestVariablesGeneric");
|
||||
ClassNode cls = getClassNodeFromSmaliWithPkg("variables", "TestVariablesGeneric");
|
||||
String code = cls.getCode().toString();
|
||||
|
||||
assertThat(code, not(containsString("iVar2")));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.class public LTestVariablesGeneric;
|
||||
.class public Lvariables/TestVariablesGeneric;
|
||||
.super Ljava/lang/Object;
|
||||
.source "SourceFile"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user