summaryrefslogtreecommitdiff
path: root/java/typeMigration/testData/refactoring/typeMigrationByAtomic/directByte/after/Test.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/typeMigration/testData/refactoring/typeMigrationByAtomic/directByte/after/Test.java')
-rw-r--r--java/typeMigration/testData/refactoring/typeMigrationByAtomic/directByte/after/Test.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/java/typeMigration/testData/refactoring/typeMigrationByAtomic/directByte/after/Test.java b/java/typeMigration/testData/refactoring/typeMigrationByAtomic/directByte/after/Test.java
new file mode 100644
index 000000000000..a1dbfc714326
--- /dev/null
+++ b/java/typeMigration/testData/refactoring/typeMigrationByAtomic/directByte/after/Test.java
@@ -0,0 +1,14 @@
+import java.util.concurrent.atomic.AtomicReference;
+
+class Test {
+ AtomicReference<Byte> b = new AtomicReference<Byte>((byte) 0);
+
+ void bar() {
+ if (b.get() == 0) {
+ b.getAndSet(new Byte((byte) (b.get() + 1)));
+ b.set(new Byte((byte) (b.get() + 0)));
+ //System.out.println(b + 10);
+ System.out.println(b.get());
+ }
+ }
+} \ No newline at end of file