提交 992100ac 编写于 作者: M mike cirioli

[JENKINS-48463] - fixed reference to deprecated Xpp3Driver and replaced with

new default driver
上级 17f74fc7
......@@ -1213,7 +1213,7 @@ public abstract class View extends AbstractModelObject implements AccessControll
// view in same ViewGroup and might not satisfy Jenkins.checkGoodName.
String oldname = name;
ViewGroup oldOwner = owner; // oddly, this field is not transient
Object o = Jenkins.XSTREAM.unmarshal(XStream2.getDefaultDriver().createReader(in), this, null, true);
Object o = Jenkins.XSTREAM2.unmarshal(XStream2.getDefaultDriver().createReader(in), this, null, true);
if (!o.getClass().equals(getClass())) {
// ensure that we've got the same view type. extending this code to support updating
// to different view type requires destroying & creating a new view type
......
......@@ -29,7 +29,7 @@ import static org.junit.Assert.*;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.thoughtworks.xstream.XStreamException;
import com.thoughtworks.xstream.io.xml.Xpp3Driver;
import com.thoughtworks.xstream.io.xml.KXml2Driver;
import com.thoughtworks.xstream.security.ForbiddenClassException;
import hudson.model.Result;
import hudson.model.Run;
......@@ -426,7 +426,7 @@ public class XStream2Test {
private Object fromXMLNullingOut(String xml, Object root) {
// Currently not offering a public convenience API for this:
return Jenkins.XSTREAM2.unmarshal(new Xpp3Driver().createReader(new StringReader(xml)), root, null, true);
return Jenkins.XSTREAM2.unmarshal(XStream2.getDefaultDriver().createReader(new StringReader(xml)), root, null, true);
}
public static class WithDefaults {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册