Skip to content

Commit

Permalink
[JENKINS-73172] Spotbugs fix / Prevent potential NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Dohbedoh committed Jun 7, 2024
1 parent ceec868 commit bae68fc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1280,10 +1280,11 @@ public void visitSource(String sourceName, SCMSourceObserver observer) throws IO
throw new AbortException("Must specify user or organization");
}

StandardCredentials credentials = getCredentials(observer.getContext(), false);
// Github client and validation
GitHub github;
try {
github = Connector.connect(apiUri, getCredentials(observer.getContext(), false));
github = Connector.connect(apiUri, credentials);
} catch (HttpException e) {
throw new AbortException(e.getMessage());
}
Expand Down

0 comments on commit bae68fc

Please sign in to comment.