Skip to content
Permalink
Browse files
[FIXED JENKINS-17402] getItem may return null but may not throw IAE.
Originally-Committed-As: 7fa8fe4096d0134f598a9d475df1c6199b9b05e7
  • Loading branch information
jglick committed Apr 25, 2013
1 parent 7c02ff9 commit 8f9e0fecb04fb61412fa8dc0396e4cb3b86d94f3
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main/java/hudson/maven/MavenModuleSet.java
@@ -434,7 +434,11 @@ public String getUrlChildPrefix() {
}

public MavenModule getItem(String name) {
return modules.get(ModuleName.fromString(name));
try {
return modules.get(ModuleName.fromString(name));
} catch (IllegalArgumentException x) {
return null; // not a Maven module name, ignore
}
}

public MavenModule getModule(String name) {

0 comments on commit 8f9e0fe

Please sign in to comment.