From e0189851b1e921199070182047dd35fa5d2d9d28 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 4 Jan 2010 17:15:49 -0800 Subject: [PATCH] Fix a broken test. This test assumed Integer.toString has no caching. --- .../luni/src/test/java/tests/api/java/util/IdentityHashMapTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcore/luni/src/test/java/tests/api/java/util/IdentityHashMapTest.java b/libcore/luni/src/test/java/tests/api/java/util/IdentityHashMapTest.java index 014347964..dec82fdae 100644 --- a/libcore/luni/src/test/java/tests/api/java/util/IdentityHashMapTest.java +++ b/libcore/luni/src/test/java/tests/api/java/util/IdentityHashMapTest.java @@ -582,7 +582,8 @@ public class IdentityHashMapTest extends junit.framework.TestCase { objArray2 = new Object[hmSize]; for (int i = 0; i < objArray.length; i++) { objArray[i] = new Integer(i); - objArray2[i] = objArray[i].toString(); + // android-changed: the containsKey test requires unique strings. + objArray2[i] = new String(objArray[i].toString()); } hm = new IdentityHashMap(); -- 2.11.0