Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit e27ea4d

Browse files
author
Brian Burkhalter
committedDec 4, 2020
8257750: writeBuffer field of java.io.DataOutputStream should be final
Reviewed-by: lancea, naoto
1 parent dd0b945 commit e27ea4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/java.base/share/classes/java/io/DataOutputStream.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public class DataOutputStream extends FilterOutputStream implements DataOutput {
5050
*/
5151
private byte[] bytearr = null;
5252

53+
private final byte[] writeBuffer = new byte[8];
54+
5355
/**
5456
* Creates a new data output stream to write data to the specified
5557
* underlying output stream. The counter {@code written} is
@@ -207,8 +209,6 @@ public final void writeInt(int v) throws IOException {
207209
incCount(4);
208210
}
209211

210-
private byte writeBuffer[] = new byte[8];
211-
212212
/**
213213
* Writes a {@code long} to the underlying output stream as eight
214214
* bytes, high byte first. In no exception is thrown, the counter

0 commit comments

Comments
 (0)