Skip to content

Commit 2535b3b

Browse files
committed
test: Add additional hashcode call to ensure incorrect calls are not redirected.
1 parent 59bb192 commit 2535b3b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/test/java/io/github/notstirred/dasm/test/tests/intra_method_redirect/IntraMethodRedirectInput.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
public class IntraMethodRedirectInput {
44
public void method1(String a) {
5+
int i = new Object().hashCode();
56
int val = a.hashCode();
67
System.out.printf("thing foo %d\n", val);
78
}

src/test/java/io/github/notstirred/dasm/test/tests/intra_method_redirect/IntraMethodRedirectOutput.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
public class IntraMethodRedirectOutput {
44
public void method1(String a) {
5+
int i = new Object().hashCode();
56
int val = a.hashCode();
67
System.out.printf("thing foo %d\n", val);
78
}
89

910
public void method1out(String a) {
11+
int i = new Object().hashCode();
1012
int val = a.length();
1113
System.out.printf("thing foo %d\n", val);
1214
}

0 commit comments

Comments
 (0)