Skip to content

Commit b9b3c7e

Browse files
committed
Polishing
1 parent 62740b7 commit b9b3c7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ConditionEvaluationResult.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ public static ConditionEvaluationResult disabled(@Nullable String reason) {
6565
*/
6666
@API(status = STABLE, since = "5.7")
6767
public static ConditionEvaluationResult disabled(@Nullable String reason, @Nullable String customReason) {
68-
if (StringUtils.isBlank(customReason)) {
69-
return disabled(reason);
70-
}
7168
if (StringUtils.isBlank(reason)) {
7269
return disabled(customReason);
7370
}
71+
if (StringUtils.isBlank(customReason)) {
72+
return disabled(reason);
73+
}
7474
return disabled("%s ==> %s".formatted(reason, customReason));
7575
}
7676

@@ -80,7 +80,7 @@ public static ConditionEvaluationResult disabled(@Nullable String reason, @Nulla
8080

8181
private ConditionEvaluationResult(boolean enabled, @Nullable String reason) {
8282
this.enabled = enabled;
83-
this.reason = StringUtils.isBlank(reason) ? Optional.empty() : Optional.of(reason.strip());
83+
this.reason = StringUtils.isNotBlank(reason) ? Optional.of(reason.strip()) : Optional.empty();
8484
}
8585

8686
/**

0 commit comments

Comments
 (0)