提交 b47f0f9e 编写于 作者: K kohsuke

fixed a reported NPE.

[#|2007-09-20T13:54:24.898-0700|WARNING|sun-appserver9.1|javax.enterprise.system.
stream.err|_ThreadID=15;_ThreadName=hudson initialization
thread;_RequestID=632d2
69a-d19a-4746-836b-0357edcfe60b;|java.lang.NullPointerException
        at
java.util.Collections$UnmodifiableCollection.<init>(Collections.java:9 94)
        at
java.util.Collections$UnmodifiableList.<init>(Collections.java:1148)
        at java.util.Collections.unmodifiableList(Collections.java:1134)
        at hudson.model.Hudson.getSlaves(Hudson.java:672)
        at hudson.model.AbstractProject.<init>(AbstractProject.java:136)
        at hudson.model.Project.<init>(Project.java:48)
        at
hudson.matrix.MatrixConfiguration.<init>(MatrixConfiguration.java:35)
        at
hudson.matrix.MatrixProject.rebuildConfigurations(MatrixProject.java:2 17)
        at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:120)
        at hudson.model.Items.load(Items.java:80)
        at hudson.model.Hudson.load(Hudson.java:1034)
        at hudson.model.Hudson.<init>(Hudson.java:232)
        at hudson.WebAppMain$1.run(WebAppMain.java:104)
|#]


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4856 71c3de6d-444a-0410-be80-ed276b4c234a
上级 ebc21c65
......@@ -225,12 +225,14 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node
else
tcpSlaveAgentListener = null;
// if we are loading old data that doesn't have this field
if(slaves==null) slaves = new ArrayList<Slave>();
// work around to have MavenModule register itself until we either move it to a plugin
// or make it a part of the core.
Items.LIST.hashCode();
load();
if(slaves==null) slaves = new ArrayList<Slave>();
updateComputerList();
getQueue().load();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册