diff --git a/core/src/test/java/hudson/util/RobustReflectionConverterTest.java b/core/src/test/java/hudson/util/RobustReflectionConverterTest.java
index 0424289ee5..3ee7e89181 100644
--- a/core/src/test/java/hudson/util/RobustReflectionConverterTest.java
+++ b/core/src/test/java/hudson/util/RobustReflectionConverterTest.java
@@ -68,6 +68,8 @@ public class RobustReflectionConverterTest extends TestCase {
return o != null ? o.value() : null;
}
});
+ String prefix1 = RobustReflectionConverterTest.class.getName() + "_-";
+ String prefix2 = RobustReflectionConverterTest.class.getName() + "$";
Enchufla s1 = new Enchufla();
s1.number = 1;
s1.direction = "North";
@@ -90,7 +92,9 @@ public class RobustReflectionConverterTest extends TestCase {
+ "2"
+ "3"
+ "",
- xs.toXML(p).replaceAll("\\Q" + RobustReflectionConverterTest.class.getName() + "\\E(_-|[$])", "").replaceAll("\r?\n *", "").replace('"', '\''));
+ xs.toXML(p).replace(prefix1, "").replace(prefix2, "").replaceAll("\r?\n *", "").replace('"', '\''));
+ Moonwalk s = (Moonwalk) xs.fromXML("<" + prefix1 + "Moonwalk plugin='p2'>" + prefix1 + "Moonwalk>");
+ assertEquals(Billy.class, s.lover.getClass());
}
@Retention(RetentionPolicy.RUNTIME) @interface Owner {String value();}
public static class Projekt {