-
Enhancement
-
Resolution: Fixed
-
P5
-
17, 18
-
None
-
b16
Method javax.swing.text.DefaultHighlighter#changeHighlight
```
if (p1 < p0) {
throw new BadLocationException("Invalid end of the range", p1);
}
...
safeDamageRange(Math.min(p0, p1), Math.max(p0, p1));
```
This Math.max and Math.min calls are redundant, because order of p0 and p1 is checked in method pre-conditions.
Checks were added underJDK-6771184
```
if (p1 < p0) {
throw new BadLocationException("Invalid end of the range", p1);
}
...
safeDamageRange(Math.min(p0, p1), Math.max(p0, p1));
```
This Math.max and Math.min calls are redundant, because order of p0 and p1 is checked in method pre-conditions.
Checks were added under