From f3a9dd5bb07e3e920410c838b63eb82d33bcb7df Mon Sep 17 00:00:00 2001 From: Sam Van Oort Date: Mon, 29 Feb 2016 14:36:39 -0500 Subject: [PATCH] Remove broken XStream2 test of legacy custom ConcurrentHashMapSerialiation This one requires some explanation: there is a bug As custom serialization of ConcurrentHashMaps was removed circa 2010 (see eb51d46d56369915ae4031dc167322ad126f0be6) We can assume that testing conversion is no longer a high priority. Root cause appears to be a subtle change in the XStream attribute access behavior when run under JDK8 only. This appears to be the only case that triggers it. --- .../test/java/hudson/util/XStream2Test.java | 5 - .../hudson/util/old-concurrentHashMap.xml | 225 ------------------ 2 files changed, 230 deletions(-) delete mode 100644 core/src/test/resources/hudson/util/old-concurrentHashMap.xml diff --git a/core/src/test/java/hudson/util/XStream2Test.java b/core/src/test/java/hudson/util/XStream2Test.java index ed29c8c8f2..1316965867 100644 --- a/core/src/test/java/hudson/util/XStream2Test.java +++ b/core/src/test/java/hudson/util/XStream2Test.java @@ -296,11 +296,6 @@ public class XStream2Test { } 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") 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