提交 c1f234f9 编写于 作者: O Olivier Lamy

add logging if file does not exist

上级 1fcb05c8
......@@ -24,6 +24,7 @@
package hudson.model;
import hudson.Util;
import hudson.XmlFile;
import hudson.model.listeners.ItemListener;
import hudson.remoting.Callable;
import hudson.security.AccessControlled;
......@@ -102,8 +103,11 @@ public abstract class ItemGroupMixIn {
// Try to retain the identity of an existing child object if we can.
V item = (V) parent.getItem(subdir.getName());
if (item == null) {
if (Items.getConfigFile( subdir ).exists()) {
XmlFile xmlFile = Items.getConfigFile( subdir );
if (xmlFile.exists()) {
item = (V) Items.load( parent, subdir );
}else{
Logger.getLogger( ItemGroupMixIn.class.getName() ).log( Level.WARNING, "could not find file " + xmlFile.getFile());
}
} else {
item.onLoad(parent, subdir.getName());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册