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 dd256b2 commit 4a4433295a7196e2f1ba0e9695826303f4396e47
Showing 1 changed file with 4 additions and 0 deletions.
@@ -414,6 +414,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 4a44332

Please sign in to comment.