Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
fix NPE in PR66
Browse files Browse the repository at this point in the history
  • Loading branch information
mheinzerling committed May 30, 2016
1 parent adc858d commit 98f574d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/hudson/plugins/jacoco/JacocoPublisher.java
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath filePath, @Nonnull
final JacocoBuildAction action = JacocoBuildAction.load(run, healthReports, taskListener, dir, includes, excludes);
action.getThresholds().ensureValid();
logger.println("[JaCoCo plugin] Thresholds: " + action.getThresholds());
run.getActions().add(action);
run.addAction(action);

logger.println("[JaCoCo plugin] Publishing the results..");
final CoverageReport result = action.getResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void testGetPercentWithBuildAndAction() {
public Run<?,?> getLastSuccessfulBuild() {
try {
Run<?,?> newBuild = newBuild();
newBuild.getActions().add(new JacocoBuildAction(null, null, StreamTaskListener.fromStdout(), null, null));
newBuild.addAction(new JacocoBuildAction(null, null, StreamTaskListener.fromStdout(), null, null));
assertEquals(1, newBuild.getActions().size());
return newBuild;
} catch (IOException e) {
Expand Down

0 comments on commit 98f574d

Please sign in to comment.