8272626: Avoid C-style array declarations in java.*

Reviewed-by: dfuchs, alanb
This commit is contained in:
Claes Redestad 2021-08-18 10:47:03 +00:00
parent e8f1219d6f
commit 30b0f820ce
54 changed files with 140 additions and 140 deletions

View file

@ -499,7 +499,7 @@ public class PrintWriter extends Writer {
* cause the corresponding method of the underlying {@code Writer}
* to throw an {@code IndexOutOfBoundsException}
*/
public void write(char buf[], int off, int len) {
public void write(char[] buf, int off, int len) {
try {
synchronized (lock) {
ensureOpen();
@ -519,7 +519,7 @@ public class PrintWriter extends Writer {
* Writer class because it must suppress I/O exceptions.
* @param buf Array of characters to be written
*/
public void write(char buf[]) {
public void write(char[] buf) {
write(buf, 0, buf.length);
}
@ -668,7 +668,7 @@ public class PrintWriter extends Writer {
*
* @throws NullPointerException If {@code s} is {@code null}
*/
public void print(char s[]) {
public void print(char[] s) {
write(s);
}
@ -801,7 +801,7 @@ public class PrintWriter extends Writer {
*
* @param x the array of {@code char} values to be printed
*/
public void println(char x[]) {
public void println(char[] x) {
synchronized (lock) {
print(x);
println();