Skip to content
Permalink
Browse files
[Fix JENKINS-25313] avoid null pointer if repository not defined
  • Loading branch information
MarkEWaite committed Oct 29, 2014
1 parent d66aef7 commit d4dda4b566478e046d8c89a6fe6f51c4dfc579de
Showing 1 changed file with 4 additions and 0 deletions.
@@ -392,6 +392,10 @@ public RemoteConfig getRepositoryByName(String repoName) {

@Exported
public List<UserRemoteConfig> getUserRemoteConfigs() {
if (userRemoteConfigs == null) {
/* Prevent NPE when no remote config defined */
userRemoteConfigs = new ArrayList<UserRemoteConfig>();
}
return Collections.unmodifiableList(userRemoteConfigs);
}

0 comments on commit d4dda4b

Please sign in to comment.