diff options
Diffstat (limited to 'java/typeMigration/testData/refactoring/typeMigrationByAtomic/directIntArray/before/Test.java')
-rw-r--r-- | java/typeMigration/testData/refactoring/typeMigrationByAtomic/directIntArray/before/Test.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/java/typeMigration/testData/refactoring/typeMigrationByAtomic/directIntArray/before/Test.java b/java/typeMigration/testData/refactoring/typeMigrationByAtomic/directIntArray/before/Test.java new file mode 100644 index 000000000000..5d39cf2963c6 --- /dev/null +++ b/java/typeMigration/testData/refactoring/typeMigrationByAtomic/directIntArray/before/Test.java @@ -0,0 +1,18 @@ +class Test { + int[] a = new int[1]; + + + void foo() { + a[0]++; + System.out.println(++a[0]); + a[0]--; + if (--a[0] == 0) { + a[0] += (2); + a[0] *= 2; + if (a[0] == 0) { + System.out.println(a[0] + 7); + } + } + a = new int[0]; + } +}
\ No newline at end of file |