Skip to content

Commit c27b80b

Browse files
committed
Do not short-circuit based on class type or message in ErrorAction.equals if a ProxyException is involved
1 parent 7c6165a commit c27b80b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/jenkinsci/plugins/workflow/actions/ErrorAction.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,11 @@ public String getUrlName() {
176176
public static boolean equals(Throwable t1, Throwable t2) {
177177
if (t1 == t2) {
178178
return true;
179-
} else if (t1.getClass() != t2.getClass()) {
179+
}
180+
boolean noProxy = t1.getClass() != ProxyException.class && t2.getClass() != ProxyException.class;
181+
if (noProxy && t1.getClass() != t2.getClass()) {
180182
return false;
181-
} else if (!Objects.equals(t1.getMessage(), t2.getMessage())) {
183+
} else if (noProxy && !Objects.equals(t1.getMessage(), t2.getMessage())) {
182184
return false;
183185
} else {
184186
String id1 = findId(t1, new HashSet<>());

0 commit comments

Comments
 (0)