Skip to content

Commit

Permalink
Fixing NPE while running a Maven build.
Browse files Browse the repository at this point in the history
java.lang.NullPointerException
    at com.chikli.hudson.plugin.naginator.NaginatorActionFactory.createFor(NaginatorActionFactory.java:20)
    at hudson.model.Run.getTransientActions(Run.java:351)
  • Loading branch information
jglick committed Apr 17, 2014
1 parent d1854c0 commit 6789567
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
@Extension
public class NaginatorActionFactory extends TransientBuildActionFactory {

@SuppressWarnings("rawtypes")
@Override
public Collection<? extends Action> createFor(Run target) {
if (target.getResult().isWorseThan(Result.SUCCESS)) {
Result result = target.getResult();
if (result != null && result.isWorseThan(Result.SUCCESS)) {
return Collections.singleton(new NaginatorRetryAction());
}
return Collections.EMPTY_LIST;
return Collections.emptyList();
}
}

1 comment on commit 6789567

@jglick
Copy link
Member Author

@jglick jglick commented on 6789567 Dec 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.