mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8272626: Avoid C-style array declarations in java.*
Reviewed-by: dfuchs, alanb
This commit is contained in:
parent
e8f1219d6f
commit
30b0f820ce
54 changed files with 140 additions and 140 deletions
|
@ -84,7 +84,7 @@ public abstract class OutputStream implements Closeable, Flushable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void write(byte b[], int off, int len) throws IOException {
|
||||
public void write(byte[] b, int off, int len) throws IOException {
|
||||
Objects.checkFromIndexSize(off, len, b.length);
|
||||
ensureOpen();
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ public abstract class OutputStream implements Closeable, Flushable {
|
|||
* @throws IOException if an I/O error occurs.
|
||||
* @see java.io.OutputStream#write(byte[], int, int)
|
||||
*/
|
||||
public void write(byte b[]) throws IOException {
|
||||
public void write(byte[] b) throws IOException {
|
||||
write(b, 0, b.length);
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ public abstract class OutputStream implements Closeable, Flushable {
|
|||
* an {@code IOException} is thrown if the output
|
||||
* stream is closed.
|
||||
*/
|
||||
public void write(byte b[], int off, int len) throws IOException {
|
||||
public void write(byte[] b, int off, int len) throws IOException {
|
||||
Objects.checkFromIndexSize(off, len, b.length);
|
||||
// len == 0 condition implicitly handled by loop bounds
|
||||
for (int i = 0 ; i < len ; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue