From 2731eb474f3f1b9c7598bd477ebbbb1aae28d833 Mon Sep 17 00:00:00 2001 From: Orion Hodson Date: Fri, 24 Jul 2020 12:10:12 +0100 Subject: More inclusive language fixes Bug: 161896447 Bug: 161850439 Bug: 161336379 Test: art/test.py --host Change-Id: I1519e22d40cb28f243dd75b12d455cfa844726fc --- test/602-deoptimizeable/src/Main.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test/602-deoptimizeable/src/Main.java') 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 map = new HashMap(); + final HashMap map = new HashMap(); // 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"); -- cgit v1.2.3-59-g8ed1b