提交 c886df06 编写于 作者: C CloudBees DEV@Cloud

Merge REMERGE_HEAD into HEAD

......@@ -46,6 +46,8 @@ import java.util.List;
import java.util.Stack;
import java.util.StringTokenizer;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import jenkins.model.DirectlyModifiableTopLevelItemGroup;
import org.apache.commons.io.FileUtils;
......@@ -138,7 +140,7 @@ public class Items {
/**
* Does the opposite of {@link #toNameList(Collection)}.
*/
public static <T extends Item> List<T> fromNameList(ItemGroup context, String list, Class<T> type) {
public static <T extends Item> List<T> fromNameList(ItemGroup context, @Nonnull String list, @Nonnull Class<T> type) {
Jenkins hudson = Jenkins.getInstance();
List<T> r = new ArrayList<T>();
......
......@@ -46,6 +46,8 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Persisted list of {@link Describable}s with some operations specific
......@@ -210,7 +212,11 @@ public class DescribableList<T extends Describable<T>, D extends Descriptor<T>>
for (Object o : this) {
if (o instanceof DependencyDeclarer) {
DependencyDeclarer dd = (DependencyDeclarer) o;
dd.buildDependencyGraph(owner,graph);
try {
dd.buildDependencyGraph(owner,graph);
} catch (RuntimeException e) {
LOGGER.log(Level.SEVERE, "Failed to build dependency graph for " + owner,e);
}
}
}
}
......@@ -277,4 +283,6 @@ public class DescribableList<T extends Describable<T>, D extends Descriptor<T>>
}
}
}
private final static Logger LOGGER = Logger.getLogger(DescribableList.class.getName());
}
......@@ -2407,7 +2407,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
return getItem(pathName,context!=null?context.getParent():null);
}
public final <T extends Item> T getItem(String pathName, ItemGroup context, Class<T> type) {
public final <T extends Item> T getItem(String pathName, ItemGroup context, @Nonnull Class<T> type) {
Item r = getItem(pathName, context);
if (type.isInstance(r))
return type.cast(r);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册