Skip to content

Commit

Permalink
[JENKINS-22213] Broken backward compatibility with version 1.14
Browse files Browse the repository at this point in the history
- Build action's readResolve() computes health report percentage which internally calls getPreviousAction(). It probably confuses the deserializer which results in StackOverflowError exception. The computation replaced by hardcoded value 100% to fix the issue.
- Relative jelly include <st:include page="../CppcheckBuildAction/statistics.jelly"/> works (probably) only in mvn hpi:run, absolute <st:include page="/org/jenkinsci/plugins/cppcheck/CppcheckBuildAction/statistics.jelly"/> is used instead.
  • Loading branch information
mixalturek committed Mar 16, 2014
1 parent 7ec573f commit fcc48c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Expand Up @@ -201,8 +201,7 @@ private Object readResolve() {
newConfig.setConfigGraph(configGraph);


return new org.jenkinsci.plugins.cppcheck.CppcheckBuildAction(owner, newResult,
org.jenkinsci.plugins.cppcheck.CppcheckBuildAction.computeHealthReportPercentage(
newResult, configSeverityEvaluation));
return new org.jenkinsci.plugins.cppcheck.CppcheckBuildAction(owner,
newResult, 100);
}
}
Expand Up @@ -103,8 +103,7 @@ private Object readResolve() {

// Backward compatibility with version 1.14 and less
if (cppcheckConfig != null) {
healthReportPercentage = computeHealthReportPercentage(result,
cppcheckConfig.getConfigSeverityEvaluation());
healthReportPercentage = 100;
}

return this;
Expand Down
Expand Up @@ -8,7 +8,7 @@
<h2>${%Summary}</h2>
<j:set var="stat" value="${it.statistics}"/>
<j:set var="diff" value="${it.diff}"/>
<st:include page="../CppcheckBuildAction/statistics.jelly"/>
<st:include page="/org/jenkinsci/plugins/cppcheck/CppcheckBuildAction/statistics.jelly"/>

<j:if test="${stat.versions != null}">
<h2>${%Cppcheck Engine}</h2>
Expand Down

0 comments on commit fcc48c6

Please sign in to comment.