Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[FIXED JENKINS-14281] Restored version <3.18 serialization conversion.
  • Loading branch information
uhafner committed Jul 5, 2012
1 parent 9df1754 commit 67a47b80752afd647378a13b41125603537a3bc8
Showing with 23 additions and 1 deletion.
  1. +23 −1 src/main/java/hudson/plugins/warnings/WarningsPublisher.java
@@ -50,7 +50,7 @@ public class WarningsPublisher extends HealthAwarePublisher {

/** File pattern and parser configurations. @since 3.19 */
@edu.umd.cs.findbugs.annotations.SuppressWarnings("SE")
private final List<ParserConfiguration> parserConfigurations = Lists.newArrayList();
private List<ParserConfiguration> parserConfigurations = Lists.newArrayList();
/** Parser configurations of the console. @since 4.6 */
@edu.umd.cs.findbugs.annotations.SuppressWarnings("SE")
private List<ConsoleParser> consoleParsers = Lists.newArrayList();
@@ -176,15 +176,37 @@ protected Object readResolve() {

if (consoleParsers == null) {
consoleParsers = Lists.newArrayList();

if (consoleLogParsers == null || parserConfigurations == null) { // release 3.18 or older
consoleLogParsers = Sets.newHashSet();
parserConfigurations = Lists.newArrayList();

if (parserNames != null) {
convertToNewFormat();
}
}

if (consoleLogParsers != null) {
for (String parser : consoleLogParsers) {
consoleParsers.add(new ConsoleParser(parser));
}
}
}

return this;
}

private void convertToNewFormat() {
if (!ignoreConsole) {
consoleLogParsers.addAll(parserNames);
}
if (StringUtils.isNotBlank(pattern)) {
for (String parser : parserNames) {
parserConfigurations.add(new ParserConfiguration(pattern, parser));
}
}
}

/**
* Returns the Ant file-set pattern of files to include in report.
*

0 comments on commit 67a47b8

Please sign in to comment.