Skip to content

Commit

Permalink
[JENKINS-40973] prevent NPE if Id is not given
Browse files Browse the repository at this point in the history
  • Loading branch information
imod committed Jan 19, 2017
1 parent b430942 commit 55c1309
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -56,9 +56,11 @@ public Collection<Config> getConfigs(Class<? extends Descriptor> descriptor) {

@Override
public Config getById(String id) {
for (Config c : configs) {
if (id.equals(c.id)) {
return c;
if (id != null) {
for (Config c : configs) {
if (id.equals(c.id)) {
return c;
}
}
}
return null;
Expand Down

0 comments on commit 55c1309

Please sign in to comment.