Remove some redundant casts.

This commit is contained in:
Ray J. Greenwell
2026-03-21 15:57:18 -07:00
parent 195562435b
commit 1fe0dc2f7f
2 changed files with 2 additions and 2 deletions
@@ -91,7 +91,7 @@ public class ByteBufferOutputStream extends OutputStream
// increase the buffer size in large increments // increase the buffer size in large increments
ncapacity = Math.max(ocapacity << 1, ncapacity); ncapacity = Math.max(ocapacity << 1, ncapacity);
ByteBuffer newbuf = ByteBuffer.allocate(ncapacity); ByteBuffer newbuf = ByteBuffer.allocate(ncapacity);
newbuf.put((ByteBuffer)_buffer.flip()); newbuf.put(_buffer.flip());
_buffer = newbuf; _buffer = newbuf;
} }
} }
@@ -117,7 +117,7 @@ public class FramedInputStream extends InputStream
// otherwise, we've filled up our buffer as a result of this // otherwise, we've filled up our buffer as a result of this
// read, expand it and try reading some more // read, expand it and try reading some more
ByteBuffer newbuf = ByteBuffer.allocate(_buffer.capacity() << 1); ByteBuffer newbuf = ByteBuffer.allocate(_buffer.capacity() << 1);
newbuf.put((ByteBuffer)_buffer.flip()); newbuf.put(_buffer.flip());
_buffer = newbuf; _buffer = newbuf;
// don't let things grow without bounds // don't let things grow without bounds