Skip to content
Permalink
Browse files

[FIXED JENKINS-4934] Do not plot or save plot data for deleted builds.

  • Loading branch information
Eric Nielsen
Eric Nielsen committed Oct 28, 2013
1 parent 09c627b commit 7731e712763908405afdc361d652bee5956083dc
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/main/java/hudson/plugins/plot/Plot.java
@@ -542,7 +542,8 @@ public String numDateString() {
int buildNum;
try {
buildNum = Integer.valueOf(record[2]);
if (buildNum > getRightBuildNum()) {
if (project.getBuildByNumber(buildNum) == null
|| buildNum > getRightBuildNum()) {
continue; // skip this record
}
} catch (NumberFormatException nfe) {
@@ -732,7 +733,9 @@ private void savePlotData() {
writer.writeNext(header2);
// write each entry of rawPlotData to a new line in the CSV file
for (String[] entry : rawPlotData) {
writer.writeNext(entry);
if (project.getBuildByNumber(Integer.parseInt(entry[2])) != null) {
writer.writeNext(entry);
}
}
} catch (IOException ioe) {
//ignore

0 comments on commit 7731e71

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