Skip to content

Commit dc06d09

Browse files
committed
Remove unreachable validation
Since `minVersion` is already validate to be at least `JRE.MINIMUM_VERSION` and there's no way to `min` to a `JRE` less than `JRE.JAVA_8` (since there are no enum constants for JRE 7 and earlier), this validation never found any illegal values.
1 parent de157c2 commit dc06d09

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/AbstractJreRangeCondition.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ protected final boolean isCurrentVersionWithinRange(JRE minJre, JRE maxJre, int
7070
// Finally, we need to validate the effective minimum and maximum values.
7171
Preconditions.condition((min != JRE.MINIMUM_VERSION || max != Integer.MAX_VALUE),
7272
() -> "You must declare a non-default value for the minimum or maximum value in @" + this.annotationName);
73-
Preconditions.condition(min >= JRE.MINIMUM_VERSION,
74-
() -> String.format("@%s's minimum value [%d] must greater than or equal to %d", this.annotationName, min,
75-
JRE.MINIMUM_VERSION));
7673
Preconditions.condition(min <= max,
7774
() -> String.format("@%s's minimum value [%d] must be less than or equal to its maximum value [%d]",
7875
this.annotationName, min, max));

0 commit comments

Comments
 (0)