Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-16 Thread Alan Bateman
On Fri, 12 Feb 2021 11:02:36 GMT, Christoph Langer wrote: >> JDK-8261422: Adjust problematic String.format calls in >> jdk/internal/util/Preconditions.java outOfBoundsMessage > > As we're potentially formatting any "Number" type here, theoretically floats > could be passed which would result

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-12 Thread Brian Burkhalter
On Tue, 9 Feb 2021 16:04:02 GMT, stefan-zobel wrote: >> I haven't written the class Preconditions.java, this question should >> probably go to the authors . >> I found the String.format syntax a bit unusual, should this be rewritten ? > > AFAIK, Preconditions was introduced in >

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-12 Thread Christoph Langer
On Tue, 9 Feb 2021 14:33:22 GMT, Matthias Baesken wrote: > JDK-8261422: Adjust problematic String.format calls in > jdk/internal/util/Preconditions.java outOfBoundsMessage As we're potentially formatting any "Number" type here, theoretically floats could be passed which would result in an

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-09 Thread stefan-zobel
On Tue, 9 Feb 2021 15:47:39 GMT, Matthias Baesken wrote: >> src/java.base/share/classes/jdk/internal/util/Preconditions.java line 212: >> >>> 210: args.get(0), args.get(1), >>> args.get(2)); >>> 211: case "checkFromIndexSize": >>> 212:

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-09 Thread Matthias Baesken
On Tue, 9 Feb 2021 15:38:29 GMT, Alan Bateman wrote: >> JDK-8261422: Adjust problematic String.format calls in >> jdk/internal/util/Preconditions.java outOfBoundsMessage > > src/java.base/share/classes/jdk/internal/util/Preconditions.java line 212: > >> 210:

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-09 Thread Alan Bateman
On Tue, 9 Feb 2021 14:33:22 GMT, Matthias Baesken wrote: > JDK-8261422: Adjust problematic String.format calls in > jdk/internal/util/Preconditions.java outOfBoundsMessage src/java.base/share/classes/jdk/internal/util/Preconditions.java line 212: > 210:

RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-09 Thread Matthias Baesken
JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage - Commit messages: - JDK-8261422 Changes: https://git.openjdk.java.net/jdk/pull/2483/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=2483=00 Issue:

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-09 Thread Matthias Baesken
On Tue, 9 Feb 2021 14:33:22 GMT, Matthias Baesken wrote: > JDK-8261422: Adjust problematic String.format calls in > jdk/internal/util/Preconditions.java outOfBoundsMessage The method outOfBoundsMessage has a few problematic calls to String.format. Those calls use "%d" however the arguments are