diff options
| author | 2020-07-24 12:10:12 +0100 | |
|---|---|---|
| committer | 2020-07-26 21:08:18 +0000 | |
| commit | 2731eb474f3f1b9c7598bd477ebbbb1aae28d833 (patch) | |
| tree | 848224dec52ebec3dcdfbfeda9c756e5fb552603 /test/602-deoptimizeable/src/Main.java | |
| parent | 14464670d7d6a226b768873f25d63f5d025941ff (diff) | |
More inclusive language fixes
Bug: 161896447
Bug: 161850439
Bug: 161336379
Test: art/test.py --host
Change-Id: I1519e22d40cb28f243dd75b12d455cfa844726fc
Diffstat (limited to 'test/602-deoptimizeable/src/Main.java')
| -rw-r--r-- | test/602-deoptimizeable/src/Main.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/602-deoptimizeable/src/Main.java b/test/602-deoptimizeable/src/Main.java index 46584b0847..ba75f5a159 100644 --- a/test/602-deoptimizeable/src/Main.java +++ b/test/602-deoptimizeable/src/Main.java @@ -19,16 +19,16 @@ import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; -class DummyObject { +class TestObject { public static boolean sHashCodeInvoked = false; private int i; - public DummyObject(int i) { + public TestObject(int i) { this.i = i; } public boolean equals(Object obj) { - return (obj instanceof DummyObject) && (i == ((DummyObject)obj).i); + return (obj instanceof TestObject) && (i == ((TestObject)obj).i); } public int hashCode() { @@ -52,7 +52,7 @@ public class Main { public static void main(String[] args) throws Exception { System.loadLibrary(args[0]); - final HashMap<DummyObject, Long> map = new HashMap<DummyObject, Long>(); + final HashMap<TestObject, Long> map = new HashMap<TestObject, Long>(); // Single-frame deoptimization that covers partial fragment. execute(new Runnable() { @@ -103,9 +103,9 @@ public class Main { execute(new Runnable() { public void run() { try { - map.put(new DummyObject(10), Long.valueOf(100)); - if (map.get(new DummyObject(10)) == null) { - System.out.println("Expected map to contain DummyObject(10)"); + map.put(new TestObject(10), Long.valueOf(100)); + if (map.get(new TestObject(10)) == null) { + System.out.println("Expected map to contain TestObject(10)"); } } catch (Exception e) { e.printStackTrace(System.out); @@ -115,10 +115,10 @@ public class Main { undeoptimizeAll(); // Make compiled code useable again. - if (!DummyObject.sHashCodeInvoked) { + if (!TestObject.sHashCodeInvoked) { System.out.println("hashCode() method not invoked!"); } - if (map.get(new DummyObject(10)) != 100) { + if (map.get(new TestObject(10)) != 100) { System.out.println("Wrong hashmap value!"); } System.out.println("Finishing"); |