Skip to content

Commit 3b1f4e2

Browse files
authored
Fix GitLabCommitStatusStep NullPointerExcetion bug (#1407)
1 parent 5b46638 commit 3b1f4e2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/main/java/com/dabsquared/gitlabjenkins/workflow/GitLabCommitStatusStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void onSuccess(StepContext context, Object result) {
109109
@Override
110110
public void onFailure(StepContext context, Throwable t) {
111111
BuildState state = BuildState.failed;
112-
if (!t.getMessage().isBlank()) {
112+
if (t != null) {
113113
if (t instanceof FlowInterruptedException) {
114114
FlowInterruptedException ex = (FlowInterruptedException) t;
115115
if (ex.isActualInterruption()) {

src/spotbugs/excludesFilter.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,7 @@
129129
<Match>
130130
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"/>
131131
</Match>
132+
<Match>
133+
<Bug pattern="NP_NULL_PARAM_DEREF"/>
134+
</Match>
132135
</FindBugsFilter>

0 commit comments

Comments
 (0)