Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #84 from hgschmie/JENKINS-44870
Browse files Browse the repository at this point in the history
quick fix for deserialization error with fileNameCache
  • Loading branch information
uhafner committed Dec 1, 2017
2 parents 098f772 + ff1144f commit e36b4cf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main/java/hudson/plugins/analysis/core/ParserResult.java
@@ -1,6 +1,7 @@
package hudson.plugins.analysis.core;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -55,7 +56,7 @@ public class ParserResult implements Serializable {
private final Workspace workspace;
/** A mapping of relative file names to absolute file names. */
@SuppressWarnings("Se")
private final Multimap<String, String> fileNameCache = HashMultimap.create();
private transient Multimap<String, String> fileNameCache = HashMultimap.create();
/** The log messages. @since 1.20 **/
private String logMessage;
/** Total number of modules. @since 1.31 **/
Expand Down Expand Up @@ -457,6 +458,15 @@ public String getLogMessages() {
return StringUtils.defaultString(logMessage);
}

/**
* repopulate the transient fileNameCache
*/
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();

this.fileNameCache = HashMultimap.create();
}

/**
* Facade for the remote workspace.
*/
Expand Down

0 comments on commit e36b4cf

Please sign in to comment.