Skip to content

Commit

Permalink
[JENKINS-48463] - fixed reference to deprecated Xpp3Driver and replac…
Browse files Browse the repository at this point in the history
…ed with

new default driver
  • Loading branch information
mikecirioli committed Jan 24, 2018
1 parent 17f74fc commit 992100a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/View.java
Expand Up @@ -1213,7 +1213,7 @@ public void updateByXml(Source source) throws IOException {
// 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
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/java/hudson/util/XStream2Test.java
Expand Up @@ -29,7 +29,7 @@
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;
Expand Down Expand Up @@ -426,7 +426,7 @@ public void unmarshalToDefault_empty() {

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 {
Expand Down

0 comments on commit 992100a

Please sign in to comment.