Skip to content

Commit

Permalink
Fixing last FindBugs error
Browse files Browse the repository at this point in the history
  • Loading branch information
jpricket committed Jun 23, 2017
1 parent f763aad commit c728860
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ private String getJavaVersion() {
}

private String getPluginVersion() {
return Jenkins.getInstance().getPluginManager().getPlugin("tfs").getVersion();
final Jenkins instance = Jenkins.getInstance();
if (instance != null && instance.getPluginManager() != null) {
return instance.getPluginManager().getPlugin("tfs").getVersion();
}
return StringUtils.EMPTY;
}
}

0 comments on commit c728860

Please sign in to comment.