提交 cc26f23e 编写于 作者: J Jesse Glick

[JENKINS-16845] Properly report the IllegalStateException, rather than...

[JENKINS-16845] Properly report the IllegalStateException, rather than throwing an NPE producing the exception message.
java.lang.NullPointerException
	at hudson.model.Run.getFullDisplayName(Run.java:711)
	at hudson.model.Run.toString(Run.java:706)
	at java.lang.String.valueOf(Unknown Source)
	at java.lang.StringBuilder.append(Unknown Source)
	at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:218)
上级 acf8884f
......@@ -217,7 +217,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
// having two neighbors pointing to each other is important to make RunMap.removeValue work
P _parent = getParent();
if (_parent == null) {
throw new IllegalStateException("no parent for " + this);
throw new IllegalStateException("no parent for " + number + " in " + workspace);
}
R pb = _parent._getRuns().search(number-1, Direction.DESC);
if (pb!=null) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册