-
Bug
-
Resolution: Fixed
-
P4
-
11, 17
-
b10
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8268753 | 11.0.13-oracle | Kiran Sidhartha Ravikumar | P4 | Resolved | Fixed | b01 |
JDK-8267441 | 11.0.12 | Matthias Baesken | P4 | Resolved | Fixed | b04 |
The method outOfBoundsMessage has a few problematic calls to String.format.
Those calls use "%d" however the arguments are Number, so we should better use %s .
Example :
https://sonarcloud.io/project/issues?id=shipilev_jdk&languages=java&open=AXcqM87A8sPJZZzON5wY&resolved=false&severities=BLOCKER&types=BUG
return String.format("Index %d out of bounds for length %d",
args.get(0), args.get(1));
Sonar error :
An 'int' is expected rather than a .
Those calls use "%d" however the arguments are Number, so we should better use %s .
Example :
https://sonarcloud.io/project/issues?id=shipilev_jdk&languages=java&open=AXcqM87A8sPJZZzON5wY&resolved=false&severities=BLOCKER&types=BUG
return String.format("Index %d out of bounds for length %d",
args.get(0), args.get(1));
Sonar error :
An 'int' is expected rather than a .
- backported by
-
JDK-8267441 Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage
-
- Resolved
-
-
JDK-8268753 Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage
-
- Resolved
-