8257750: writeBuffer field of java.io.DataOutputStream should be final

Reviewed-by: lancea, naoto
This commit is contained in:
Brian Burkhalter 2020-12-04 20:32:07 +00:00
parent dd0b9454a2
commit e27ea4d12c

View file

@ -50,6 +50,8 @@ public class DataOutputStream extends FilterOutputStream implements DataOutput {
*/
private byte[] bytearr = null;
private final byte[] writeBuffer = new byte[8];
/**
* Creates a new data output stream to write data to the specified
* underlying output stream. The counter {@code written} is
@ -207,8 +209,6 @@ public class DataOutputStream extends FilterOutputStream implements DataOutput {
incCount(4);
}
private byte writeBuffer[] = new byte[8];
/**
* Writes a {@code long} to the underlying output stream as eight
* bytes, high byte first. In no exception is thrown, the counter