RFR: 8299600: Use Objects.check*() where appropriate in java.io
Scott Palmer
swpalmer at openjdk.org
Wed Jan 4 19:55:48 UTC 2023
On Wed, 4 Jan 2023 15:50:35 GMT, Sergey Tsypanov <stsypanov at openjdk.org> wrote:
> Use the following methods instead of hand-written code:
> - Objects.checkFromIndexSize()
> - Objects.checkFromToIndex()
src/java.base/share/classes/java/io/CharArrayWriter.java line 101:
> 99: */
> 100: public void write(char[] c, int off, int len) {
> 101: Objects.checkFromToIndex(off, len, c.length);
shouldn't that be Objects.checkFromIndexSize(off, len, c.length);
-------------
PR: https://git.openjdk.org/jdk/pull/11849
More information about the core-libs-dev
mailing list