8258444: Clean up specifications of java.io.Reader.read(char[],int,int) in subclass overrides

Reviewed-by: alanb, rriggs
This commit is contained in:
Brian Burkhalter 2021-02-25 16:22:59 +00:00
parent 7d4f60b16b
commit 5a9b70103c
9 changed files with 101 additions and 115 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -162,20 +162,11 @@ public class InputStreamReader extends Reader {
}
/**
* Reads characters into a portion of an array.
*
* @param cbuf Destination buffer
* @param offset Offset at which to start storing characters
* @param length Maximum number of characters to read
*
* @return The number of characters read, or -1 if the end of the
* stream has been reached
*
* @throws IOException If an I/O error occurs
* @throws IndexOutOfBoundsException {@inheritDoc}
* {@inheritDoc}
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public int read(char cbuf[], int offset, int length) throws IOException {
return sd.read(cbuf, offset, length);
public int read(char[] cbuf, int off, int len) throws IOException {
return sd.read(cbuf, off, len);
}
/**