Skip to content

Commit

Permalink
Do not short-circuit based on class type or message in ErrorAction.eq…
Browse files Browse the repository at this point in the history
…uals if a ProxyException is involved
  • Loading branch information
dwnusbaum committed May 16, 2024
1 parent 7c6165a commit c27b80b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ public String getUrlName() {
public static boolean equals(Throwable t1, Throwable t2) {
if (t1 == t2) {
return true;
} else if (t1.getClass() != t2.getClass()) {
}
boolean noProxy = t1.getClass() != ProxyException.class && t2.getClass() != ProxyException.class;

Check warning on line 180 in src/main/java/org/jenkinsci/plugins/workflow/actions/ErrorAction.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 180 is only partially covered, one branch is missing
if (noProxy && t1.getClass() != t2.getClass()) {

Check warning on line 181 in src/main/java/org/jenkinsci/plugins/workflow/actions/ErrorAction.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 181 is only partially covered, one branch is missing
return false;
} else if (!Objects.equals(t1.getMessage(), t2.getMessage())) {
} else if (noProxy && !Objects.equals(t1.getMessage(), t2.getMessage())) {
return false;
} else {
String id1 = findId(t1, new HashSet<>());
Expand Down

0 comments on commit c27b80b

Please sign in to comment.