Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-72067] Maintain just one XStream2 for changelog parsing #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
target

# mvn hpi:run
work

# IntelliJ IDEA project files
*.iml
*.iws
*.ipr
.idea

# Eclipse project files
.settings
.classpath
.project
14 changes: 2 additions & 12 deletions src/main/java/hudson/plugins/filesystem_scm/ChangelogSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,8 @@ public boolean equals(Object obj) {
}

public static class XMLSerializer extends hudson.scm.ChangeLogParser {
private transient XStream2 xstream;

private Object readResolve() { // xstream field used to be serialized in build.xml
initXStream();
return this;
}

public XMLSerializer() {
initXStream();
}

private void initXStream() {
private static final XStream2 xstream;
static {
xstream = new XStream2();
xstream.alias("log", ChangelogSet.class);
// xstream.addImplicitCollection(ChangelogSet.class, "changeLogSet");
Expand Down