提交 8899d864 编写于 作者: K kohsuke

inconsistency in the code as to whether this can be null or not.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15749 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6cd565fd
......@@ -43,11 +43,14 @@ import java.util.List;
* @since 1.286
*/
public class ToolLocationNodeProperty extends NodeProperty<Node> {
/**
* Override locations. Never null.
*/
private final List<ToolLocation> locations;
@DataBoundConstructor
public ToolLocationNodeProperty(List<ToolLocation> locations) {
if(locations==null) throw new IllegalArgumentException();
this.locations = locations;
}
......@@ -56,7 +59,6 @@ public class ToolLocationNodeProperty extends NodeProperty<Node> {
}
public List<ToolLocation> getLocations() {
if (locations == null) return Collections.emptyList();
return Collections.unmodifiableList(locations);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册