diff --git a/core/src/test/java/hudson/util/XStream2Test.java b/core/src/test/java/hudson/util/XStream2Test.java index ed29c8c8f2..aeb781f672 100644 --- a/core/src/test/java/hudson/util/XStream2Test.java +++ b/core/src/test/java/hudson/util/XStream2Test.java @@ -272,37 +272,6 @@ public class XStream2Test { ConcurrentHashMap m = new ConcurrentHashMap(); } - /** - * Tests that ConcurrentHashMap is serialized into a more compact format, - * but still can deserialize to older, verbose format. - */ - @Test - public void concurrentHashMapSerialization() throws Exception { - Foo2 foo = new Foo2(); - foo.m.put("abc","def"); - foo.m.put("ghi","jkl"); - File v = File.createTempFile("hashmap", "xml"); - try { - new XmlFile(v).write(foo); - - // should serialize like map - String xml = FileUtils.readFileToString(v); - assertFalse(xml.contains("java.util.concurrent")); - //System.out.println(xml); - Foo2 deserialized = (Foo2) new XStream2().fromXML(xml); - assertEquals(2,deserialized.m.size()); - assertEquals("def", deserialized.m.get("abc")); - assertEquals("jkl", deserialized.m.get("ghi")); - } finally { - v.delete(); - } - - // should be able to read in old data just fine - Foo2 map = (Foo2) new XStream2().fromXML(getClass().getResourceAsStream("old-concurrentHashMap.xml")); - assertEquals(1,map.m.size()); - assertEquals("def",map.m.get("abc")); - } - @Issue("SECURITY-105") @Test public void dynamicProxyBlocked() { diff --git a/core/src/test/resources/hudson/util/old-concurrentHashMap.xml b/core/src/test/resources/hudson/util/old-concurrentHashMap.xml deleted file mode 100644 index 14b7ef152c..0000000000 --- a/core/src/test/resources/hudson/util/old-concurrentHashMap.xml +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - 15 - 28 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - - - 0 - - - - - - - 0.75 - - - - abc - def - - - - - \ No newline at end of file