From 28dfd90d2d6ae99c57eb174871c46f4e07e303ba Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 24 Sep 2014 08:49:21 -0400 Subject: [PATCH] Better to use an IllegalStateException rather than assertion in setResult. Assertions are only for cases where you believe the failure of the condition is impossible. For cases where external code might mistakenly make an incorrect call, throw an exception. --- core/src/main/java/hudson/model/Run.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index 3f30f31d9d..9b6d5e202b 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -440,9 +440,18 @@ public abstract class Run ,RunT extends Run