--- a/src/java.base/share/classes/java/io/BufferedInputStream.java Mon Oct 22 14:41:51 2018 -0700
+++ b/src/java.base/share/classes/java/io/BufferedInputStream.java Mon Oct 22 17:00:04 2018 -0700
@@ -238,7 +238,7 @@
nsz = marklimit;
byte[] nbuf = new byte[nsz];
System.arraycopy(buffer, 0, nbuf, 0, pos);
- if (!U.compareAndSetObject(this, BUF_OFFSET, buffer, nbuf)) {
+ if (!U.compareAndSetReference(this, BUF_OFFSET, buffer, nbuf)) {
// Can't replace buf if there was an async close.
// Note: This would need to be changed if fill()
// is ever made accessible to multiple threads.
@@ -482,7 +482,7 @@
public void close() throws IOException {
byte[] buffer;
while ( (buffer = buf) != null) {
- if (U.compareAndSetObject(this, BUF_OFFSET, buffer, null)) {
+ if (U.compareAndSetReference(this, BUF_OFFSET, buffer, null)) {
InputStream input = in;
in = null;
if (input != null)