Skip to content
Permalink
Browse files

Merge pull request #84 from hgschmie/JENKINS-44870

quick fix for deserialization error with fileNameCache
  • Loading branch information
uhafner committed Dec 1, 2017
2 parents 098f772 + ff1144f commit e36b4cfc2f5b02da4be035500b9d220105fd58c6
Showing with 11 additions and 1 deletion.
  1. +11 −1 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;
@@ -55,7 +56,7 @@
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 **/
@@ -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.
*/

0 comments on commit e36b4cf

Please sign in to comment.
You can’t perform that action at this time.