Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinston Prakash2015-04-23 13:41:16 -0400
committerWinston Prakash2015-04-23 13:41:26 -0400
commit36726b074f5171ccd4e5fcf23557233a7a0fb81e (patch)
tree2b2efc49ae9e31e2895760d985803731469c8d95
parent356d781bf82aa442b5d0cfa8588dff4e3e94166b (diff)
downloadorg.eclipse.hudson.core-36726b074f5171ccd4e5fcf23557233a7a0fb81e.tar.gz
org.eclipse.hudson.core-36726b074f5171ccd4e5fcf23557233a7a0fb81e.tar.xz
org.eclipse.hudson.core-36726b074f5171ccd4e5fcf23557233a7a0fb81e.zip
Fix: 444314 - Upgrade to XStream v. 1.4.7 to fix Hudson not compatible with Azul Systems Open JDK (Part 1)
-rw-r--r--hudson-core/pom.xml2
-rw-r--r--hudson-core/src/main/java/hudson/security/AuthorizationMatrixProperty.java50
-rw-r--r--hudson-core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java17
-rw-r--r--hudson-core/src/main/java/hudson/tasks/Maven.java33
-rw-r--r--hudson-core/src/main/java/hudson/tools/ToolInstallation.java15
-rw-r--r--hudson-core/src/main/java/hudson/util/NonExistentFieldException.java27
-rw-r--r--hudson-core/src/main/java/hudson/util/RobustReflectionConverter.java5
-rw-r--r--hudson-core/src/main/java/hudson/util/XStream2.java134
-rw-r--r--hudson-core/src/main/java/hudson/util/XStreamSerializable.java21
-rw-r--r--hudson-core/src/test/java/hudson/util/XStream2Test.java14
-rw-r--r--hudson-utils/pom.xml2
-rw-r--r--pom.xml4
12 files changed, 176 insertions, 148 deletions
diff --git a/hudson-core/pom.xml b/hudson-core/pom.xml
index 0e1cfd92..1bb2ab21 100644
--- a/hudson-core/pom.xml
+++ b/hudson-core/pom.xml
@@ -393,7 +393,7 @@
<artifactId>localizer</artifactId>
</dependency>
<dependency>
- <groupId>org.hudsonci.tools</groupId>
+ <groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<exclusions>
<exclusion>
diff --git a/hudson-core/src/main/java/hudson/security/AuthorizationMatrixProperty.java b/hudson-core/src/main/java/hudson/security/AuthorizationMatrixProperty.java
index c4a3dae3..b4beaacd 100644
--- a/hudson-core/src/main/java/hudson/security/AuthorizationMatrixProperty.java
+++ b/hudson-core/src/main/java/hudson/security/AuthorizationMatrixProperty.java
@@ -15,45 +15,40 @@
package hudson.security;
+import com.thoughtworks.xstream.converters.Converter;
+import com.thoughtworks.xstream.converters.MarshallingContext;
+import com.thoughtworks.xstream.converters.UnmarshallingContext;
+import com.thoughtworks.xstream.io.HierarchicalStreamReader;
+import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
+import hudson.Extension;
import hudson.diagnosis.OldDataMonitor;
import hudson.model.AbstractProject;
+import hudson.model.Computer;
import hudson.model.Item;
import hudson.model.Job;
import hudson.model.JobProperty;
import hudson.model.JobPropertyDescriptor;
import hudson.model.Run;
-import hudson.Extension;
+import hudson.model.View;
import hudson.util.FormValidation;
import hudson.util.RobustReflectionConverter;
-
+import java.io.IOException;
import java.util.Arrays;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Set;
-import java.util.Collections;
import java.util.Map.Entry;
+import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
-import java.io.IOException;
-
-import net.sf.json.JSONObject;
-
-import org.kohsuke.stapler.StaplerRequest;
-import org.kohsuke.stapler.QueryParameter;
-import org.kohsuke.stapler.AncestorInPath;
-
-import com.thoughtworks.xstream.converters.Converter;
-import com.thoughtworks.xstream.converters.MarshallingContext;
-import com.thoughtworks.xstream.converters.UnmarshallingContext;
-import com.thoughtworks.xstream.io.HierarchicalStreamReader;
-import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
-import hudson.model.Computer;
-import hudson.model.View;
-
import javax.servlet.ServletException;
+import net.sf.json.JSONObject;
import org.eclipse.hudson.security.HudsonSecurityEntitiesHolder;
+import org.kohsuke.stapler.AncestorInPath;
+import org.kohsuke.stapler.QueryParameter;
+import org.kohsuke.stapler.StaplerRequest;
import org.springframework.security.acls.model.Sid;
/**
@@ -266,16 +261,17 @@ public class AuthorizationMatrixProperty extends JobProperty<Job<?, ?>> {
final UnmarshallingContext context) {
AuthorizationMatrixProperty as = new AuthorizationMatrixProperty();
- String prop = reader.peekNextChild();
- if (prop != null && prop.equals("useProjectSecurity")) {
- reader.moveDown();
- reader.getValue(); // we used to use this but not any more.
- reader.moveUp();
- }
while (reader.hasMoreChildren()) {
reader.moveDown();
try {
- as.add(reader.getValue());
+ String prop = reader.getValue();
+ if (prop != null) {
+ if (prop.equals("useProjectSecurity")) {
+ // Do nothing, we no longer use it
+ } else {
+ as.add(prop);
+ }
+ }
} catch (IllegalArgumentException ex) {
Logger.getLogger(AuthorizationMatrixProperty.class.getName())
.log(Level.WARNING, "Skipping a non-existent permission", ex);
diff --git a/hudson-core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java b/hudson-core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java
index 5ca1b84b..b1e006c1 100644
--- a/hudson-core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java
+++ b/hudson-core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java
@@ -16,16 +16,16 @@
package hudson.security;
+import com.thoughtworks.xstream.converters.UnmarshallingContext;
+import com.thoughtworks.xstream.core.JVM;
+import com.thoughtworks.xstream.io.ExtendedHierarchicalStreamReader;
+import com.thoughtworks.xstream.io.HierarchicalStreamReader;
+import com.thoughtworks.xstream.mapper.Mapper;
+import hudson.Extension;
import hudson.model.Descriptor;
import hudson.model.Hudson;
import hudson.model.Job;
import hudson.util.RobustReflectionConverter;
-import hudson.Extension;
-import com.thoughtworks.xstream.io.HierarchicalStreamReader;
-import com.thoughtworks.xstream.converters.UnmarshallingContext;
-import com.thoughtworks.xstream.mapper.Mapper;
-import com.thoughtworks.xstream.core.JVM;
-
import java.util.HashSet;
import java.util.Set;
@@ -88,7 +88,10 @@ public class ProjectMatrixAuthorizationStrategy extends GlobalMatrixAuthorizatio
@Override
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
- String name = reader.peekNextChild();
+ String name = null;
+ if (reader instanceof ExtendedHierarchicalStreamReader) {
+ name = ((ExtendedHierarchicalStreamReader) reader).peekNextChild();
+ }
if (name != null && (name.equals("permission") || name.equals("useProjectSecurity"))) // the proper serialization form
{
return super.unmarshal(reader, context);
diff --git a/hudson-core/src/main/java/hudson/tasks/Maven.java b/hudson-core/src/main/java/hudson/tasks/Maven.java
index e0064d6b..b0afc05a 100644
--- a/hudson-core/src/main/java/hudson/tasks/Maven.java
+++ b/hudson-core/src/main/java/hudson/tasks/Maven.java
@@ -16,52 +16,51 @@
package hudson.tasks;
+import hudson.CopyOnWrite;
+import hudson.EnvVars;
import hudson.Extension;
-import hudson.Launcher;
+import hudson.FilePath.FileCallable;
import hudson.Functions;
-import hudson.EnvVars;
-import hudson.Util;
-import hudson.CopyOnWrite;
+import hudson.Launcher;
import hudson.Launcher.LocalLauncher;
-import hudson.FilePath.FileCallable;
+import hudson.Util;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.BuildListener;
import hudson.model.Computer;
import hudson.model.EnvironmentSpecific;
-import hudson.model.Node;
import hudson.model.Hudson;
+import hudson.model.Node;
import hudson.model.TaskListener;
import hudson.remoting.Callable;
import hudson.remoting.VirtualChannel;
import hudson.slaves.NodeSpecific;
import hudson.tasks._maven.MavenConsoleAnnotator;
+import hudson.tools.DownloadFromUrlInstaller;
import hudson.tools.ToolDescriptor;
import hudson.tools.ToolInstallation;
-import hudson.tools.DownloadFromUrlInstaller;
import hudson.tools.ToolInstaller;
import hudson.tools.ToolProperty;
import hudson.util.ArgumentListBuilder;
+import hudson.util.FormValidation;
import hudson.util.NullStream;
import hudson.util.StreamTaskListener;
import hudson.util.VariableResolver;
-import hudson.util.FormValidation;
import hudson.util.XStream2;
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.StringTokenizer;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.kohsuke.stapler.DataBoundConstructor;
-import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.QueryParameter;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.List;
-import java.util.Collections;
-import java.util.Set;
+import org.kohsuke.stapler.StaplerRequest;
/**
* Build by using Maven.
diff --git a/hudson-core/src/main/java/hudson/tools/ToolInstallation.java b/hudson-core/src/main/java/hudson/tools/ToolInstallation.java
index 205299d0..35d13a5c 100644
--- a/hudson-core/src/main/java/hudson/tools/ToolInstallation.java
+++ b/hudson-core/src/main/java/hudson/tools/ToolInstallation.java
@@ -16,23 +16,26 @@
package hudson.tools;
+import com.thoughtworks.xstream.converters.UnmarshallingContext;
import hudson.DescriptorExtensionList;
import hudson.EnvVars;
import hudson.Extension;
import hudson.ExtensionPoint;
import hudson.diagnosis.OldDataMonitor;
-import hudson.model.*;
+import hudson.model.AbstractDescribableImpl;
+import hudson.model.EnvironmentSpecific;
+import hudson.model.Hudson;
+import hudson.model.Node;
+import hudson.model.Saveable;
+import hudson.model.TaskListener;
import hudson.slaves.NodeSpecific;
import hudson.util.DescribableList;
import hudson.util.XStream2;
-
-import java.io.Serializable;
+import hudson.util.XStreamSerializable;
import java.io.IOException;
+import java.io.Serializable;
import java.util.List;
-import com.thoughtworks.xstream.annotations.XStreamSerializable;
-import com.thoughtworks.xstream.converters.UnmarshallingContext;
-
/**
* Formalization of a tool installed in nodes used for builds (examples include
* things like JDKs, Ants, Mavens, etc..)
diff --git a/hudson-core/src/main/java/hudson/util/NonExistentFieldException.java b/hudson-core/src/main/java/hudson/util/NonExistentFieldException.java
new file mode 100644
index 00000000..cdf94dbb
--- /dev/null
+++ b/hudson-core/src/main/java/hudson/util/NonExistentFieldException.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2015 Hudson.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Hudson - initial API and implementation and/or initial documentation
+ */
+package hudson.util;
+
+import com.thoughtworks.xstream.converters.reflection.ObjectAccessException;
+
+public class NonExistentFieldException extends ObjectAccessException {
+
+ private final String fieldName;
+
+ public NonExistentFieldException(String message, String fieldName) {
+ super(message);
+ this.fieldName = fieldName;
+ }
+
+ public String getFieldName() {
+ return fieldName;
+ }
+}
diff --git a/hudson-core/src/main/java/hudson/util/RobustReflectionConverter.java b/hudson-core/src/main/java/hudson/util/RobustReflectionConverter.java
index 6591971e..57f2f073 100644
--- a/hudson-core/src/main/java/hudson/util/RobustReflectionConverter.java
+++ b/hudson-core/src/main/java/hudson/util/RobustReflectionConverter.java
@@ -21,7 +21,7 @@ import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.SingleValueConverter;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
-import com.thoughtworks.xstream.converters.reflection.NonExistentFieldException;
+import com.thoughtworks.xstream.converters.reflection.MissingFieldException;
import com.thoughtworks.xstream.converters.reflection.ObjectAccessException;
import com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider;
import com.thoughtworks.xstream.converters.reflection.ReflectionConverter;
@@ -44,7 +44,6 @@ import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import static java.util.logging.Level.FINE;
-
import java.util.logging.Logger;
/**
@@ -243,7 +242,7 @@ public class RobustReflectionConverter implements Converter {
implicitCollectionsForCurrentObject = writeValueToImplicitCollection(context, value, implicitCollectionsForCurrentObject, result, fieldName);
}
}
- } catch (NonExistentFieldException e) {
+ } catch (MissingFieldException e) {
LOGGER.log(FINE, "Skipping a non-existent field " + e.getFieldName());
addErrorInContext(context, e);
} catch (CannotResolveClassException e) {
diff --git a/hudson-core/src/main/java/hudson/util/XStream2.java b/hudson-core/src/main/java/hudson/util/XStream2.java
index 5e4e068c..378326fd 100644
--- a/hudson-core/src/main/java/hudson/util/XStream2.java
+++ b/hudson-core/src/main/java/hudson/util/XStream2.java
@@ -1,26 +1,23 @@
-/*******************************************************************************
+/**
+ * *****************************************************************************
*
* Copyright (c) 2004-2010 Oracle Corporation.
*
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*
- * Kohsuke Kawaguchi, Alan Harder
+ * Kohsuke Kawaguchi, Alan Harder
*
*
- *******************************************************************************/
-
+ ******************************************************************************
+ */
package hudson.util;
-import com.google.common.collect.ImmutableMap;
import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.mapper.AnnotationMapper;
-import com.thoughtworks.xstream.mapper.Mapper;
-import com.thoughtworks.xstream.mapper.MapperWrapper;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.ConverterMatcher;
import com.thoughtworks.xstream.converters.DataHolder;
@@ -32,14 +29,13 @@ import com.thoughtworks.xstream.core.JVM;
import com.thoughtworks.xstream.io.HierarchicalStreamDriver;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
-import com.thoughtworks.xstream.mapper.CannotResolveClassException;
+import com.thoughtworks.xstream.mapper.Mapper;
import hudson.diagnosis.OldDataMonitor;
import hudson.model.Hudson;
import hudson.model.Label;
import hudson.model.Result;
import hudson.model.Saveable;
import hudson.util.xstream.ImmutableMapConverter;
-
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.ConcurrentHashMap;
@@ -83,46 +79,41 @@ public class XStream2 extends XStream {
return o;
}
- @Override
- protected Converter createDefaultConverter() {
- // replace default reflection converter
- reflectionConverter = new RobustReflectionConverter(getMapper(), new JVM().bestReflectionProvider());
- return reflectionConverter;
- }
-
private void init() {
// list up types that should be marshalled out like a value, without referencial integrity tracking.
addImmutableType(Result.class);
- registerConverter(new RobustCollectionConverter(getMapper(), getReflectionProvider()), 10);
- registerConverter(new ImmutableMapConverter(getMapper(), getReflectionProvider()), 10);
- registerConverter(new ConcurrentHashMapConverter(getMapper(), getReflectionProvider()), 10);
- registerConverter(new CopyOnWriteMap.Tree.ConverterImpl(getMapper()), 10); // needs to override MapConverter
- registerConverter(new DescribableList.ConverterImpl(getMapper()), 10); // explicitly added to handle subtypes
- registerConverter(new Label.ConverterImpl(), 10);
+ registerConverter(new RobustCollectionConverter(getMapper(), getReflectionProvider()), XStream.PRIORITY_NORMAL);
+ registerConverter(new ImmutableMapConverter(getMapper(), getReflectionProvider()), XStream.PRIORITY_NORMAL);
+ registerConverter(new ConcurrentHashMapConverter(getMapper(), getReflectionProvider()), XStream.PRIORITY_NORMAL);
+ registerConverter(new CopyOnWriteMap.Tree.ConverterImpl(getMapper()), XStream.PRIORITY_NORMAL); // needs to override MapConverter
+ registerConverter(new DescribableList.ConverterImpl(getMapper()), XStream.PRIORITY_NORMAL); // explicitly added to handle subtypes
+ registerConverter(new Label.ConverterImpl(), XStream.PRIORITY_NORMAL);
// this should come after all the XStream's default simpler converters,
// but before reflection-based one kicks in.
- registerConverter(new AssociatedConverterImpl(this), -10);
- }
-
- @Override
- protected MapperWrapper wrapMapper(MapperWrapper next) {
- Mapper m = new CompatibilityMapper(new MapperWrapper(next) {
- @Override
- public String serializedClass(Class type) {
- if (type != null && ImmutableMap.class.isAssignableFrom(type)) {
- return super.serializedClass(ImmutableMap.class);
- } else {
- return super.serializedClass(type);
- }
- }
- });
- AnnotationMapper a = new AnnotationMapper(m, getConverterRegistry(), getClassLoader(), getReflectionProvider(), getJvm());
- a.autodetectAnnotations(true);
- return a;
+ registerConverter(new AssociatedConverterImpl(this), XStream.PRIORITY_LOW);
+ registerConverter(new RobustReflectionConverter(getMapper(), new JVM().bestReflectionProvider()), XStream.PRIORITY_VERY_LOW);
+ reflectionConverter = new RobustReflectionConverter(getMapper(), new JVM().bestReflectionProvider());
+ registerConverter(reflectionConverter, XStream.PRIORITY_VERY_LOW);
}
+// @Override
+// protected MapperWrapper wrapMapper(MapperWrapper next) {
+// Mapper m = new CompatibilityMapper(new MapperWrapper(next) {
+// @Override
+// public String serializedClass(Class type) {
+// if (type != null && ImmutableMap.class.isAssignableFrom(type)) {
+// return super.serializedClass(ImmutableMap.class);
+// } else {
+// return super.serializedClass(type);
+// }
+// }
+// });
+// AnnotationMapper a = new AnnotationMapper(m, getConverterRegistry(), getClassLoader(), getReflectionProvider(), getJvm());
+// a.autodetectAnnotations(true);
+// return a;
+// }
/**
* Prior to Hudson 1.106, XStream 1.1.x was used which encoded "$" in class
* names as "-" instead of "_-" that is used now. Up through Hudson 1.348
@@ -131,32 +122,31 @@ public class XStream2 extends XStream {
* that this caused fields with "__" to fail deserialization due to double
* decoding. Now this class is used for compatibility.
*/
- private class CompatibilityMapper extends MapperWrapper {
-
- private CompatibilityMapper(Mapper wrapped) {
- super(wrapped);
- }
-
- @Override
- public Class realClass(String elementName) {
- try {
- return super.realClass(elementName);
- } catch (CannotResolveClassException e) {
- // If a "-" is found, retry with mapping this to "$"
- if (elementName.indexOf('-') >= 0) {
- try {
- Class c = super.realClass(elementName.replace('-', '$'));
- oldData.set(Boolean.TRUE);
- return c;
- } catch (CannotResolveClassException e2) {
- }
- }
- // Throw original exception
- throw e;
- }
- }
- }
-
+// private class CompatibilityMapper extends MapperWrapper {
+//
+// private CompatibilityMapper(Mapper wrapped) {
+// super(wrapped);
+// }
+//
+// @Override
+// public Class realClass(String elementName) {
+// try {
+// return super.realClass(elementName);
+// } catch (CannotResolveClassException e) {
+// // If a "-" is found, retry with mapping this to "$"
+// if (elementName.indexOf('-') >= 0) {
+// try {
+// Class c = super.realClass(elementName.replace('-', '$'));
+// oldData.set(Boolean.TRUE);
+// return c;
+// } catch (CannotResolveClassException e2) {
+// }
+// }
+// // Throw original exception
+// throw e;
+// }
+// }
+// }
/**
* If a class defines a nested {@code ConverterImpl} subclass, use that as a
* {@link Converter}. Its constructor may have XStream/XStream2 and/or
@@ -165,8 +155,8 @@ public class XStream2 extends XStream {
private static final class AssociatedConverterImpl implements Converter {
private final XStream xstream;
- private final ConcurrentHashMap<Class, Converter> cache =
- new ConcurrentHashMap<Class, Converter>();
+ private final ConcurrentHashMap<Class, Converter> cache
+ = new ConcurrentHashMap<Class, Converter>();
private AssociatedConverterImpl(XStream xstream) {
this.xstream = xstream;
diff --git a/hudson-core/src/main/java/hudson/util/XStreamSerializable.java b/hudson-core/src/main/java/hudson/util/XStreamSerializable.java
new file mode 100644
index 00000000..b2b4e877
--- /dev/null
+++ b/hudson-core/src/main/java/hudson/util/XStreamSerializable.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2015 Hudson.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Hudson - initial API and implementation and/or initial documentation
+ */
+package hudson.util;
+
+import static java.lang.annotation.ElementType.FIELD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+@Retention(RUNTIME)
+@Target(FIELD)
+public @interface XStreamSerializable {
+}
diff --git a/hudson-core/src/test/java/hudson/util/XStream2Test.java b/hudson-core/src/test/java/hudson/util/XStream2Test.java
index 2dafcf1f..369a6f88 100644
--- a/hudson-core/src/test/java/hudson/util/XStream2Test.java
+++ b/hudson-core/src/test/java/hudson/util/XStream2Test.java
@@ -17,11 +17,10 @@
package hudson.util;
import com.google.common.collect.ImmutableMap;
-import junit.framework.TestCase;
import hudson.model.Result;
import hudson.model.Run;
-
import java.util.Map;
+import junit.framework.TestCase;
/**
* Tests for XML serialization of java objects.
@@ -44,16 +43,7 @@ public class XStream2Test extends TestCase {
private static class Bar {
String s;
}
-
- /**
- * Test ability to read old XML from Hudson 1.105 or older.
- */
- public void testXStream11Compatibility() {
- Bar b = (Bar)new XStream2().fromXML(
- "<hudson.util.XStream2Test-Bar><s>foo</s></hudson.util.XStream2Test-Bar>");
- assertEquals("foo", b.s);
- }
-
+
public static final class __Foo_Bar$Class {
String under_1 = "1", under__2 = "2",
_leadUnder1 = "L1", __leadUnder2 = "L2",
diff --git a/hudson-utils/pom.xml b/hudson-utils/pom.xml
index 7f49665e..9471c085 100644
--- a/hudson-utils/pom.xml
+++ b/hudson-utils/pom.xml
@@ -59,7 +59,7 @@
</dependency>
<dependency>
- <groupId>org.hudsonci.tools</groupId>
+ <groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
</dependency>
diff --git a/pom.xml b/pom.xml
index 58a13665..64f75e53 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,7 +137,7 @@
<logback-classic.version>0.9.28</logback-classic.version>
<guava.version>14.0.1</guava.version>
<ant.version>1.8.2</ant.version>
- <xstream.version>1.4.1-hudson-2</xstream.version>
+ <xstream.version>1.4.8</xstream.version>
<jsr305.version>1.3.9</jsr305.version>
<commons-lang.version>3.0.1</commons-lang.version>
<commons-io.version>2.0.1</commons-io.version>
@@ -756,7 +756,7 @@
</dependency>
<dependency>
- <groupId>org.hudsonci.tools</groupId>
+ <groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>${xstream.version}</version>
</dependency>

Back to the top