diff --git a/core/src/main/java/com/threerings/io/ByteBufferOutputStream.java b/core/src/main/java/com/threerings/io/ByteBufferOutputStream.java index 37c1c54b6..21afc5fe8 100644 --- a/core/src/main/java/com/threerings/io/ByteBufferOutputStream.java +++ b/core/src/main/java/com/threerings/io/ByteBufferOutputStream.java @@ -91,7 +91,7 @@ public class ByteBufferOutputStream extends OutputStream // increase the buffer size in large increments ncapacity = Math.max(ocapacity << 1, ncapacity); ByteBuffer newbuf = ByteBuffer.allocate(ncapacity); - newbuf.put((ByteBuffer)_buffer.flip()); + newbuf.put(_buffer.flip()); _buffer = newbuf; } } diff --git a/core/src/main/java/com/threerings/io/FramedInputStream.java b/core/src/main/java/com/threerings/io/FramedInputStream.java index db898eb67..78a70839f 100644 --- a/core/src/main/java/com/threerings/io/FramedInputStream.java +++ b/core/src/main/java/com/threerings/io/FramedInputStream.java @@ -117,7 +117,7 @@ public class FramedInputStream extends InputStream // otherwise, we've filled up our buffer as a result of this // read, expand it and try reading some more ByteBuffer newbuf = ByteBuffer.allocate(_buffer.capacity() << 1); - newbuf.put((ByteBuffer)_buffer.flip()); + newbuf.put(_buffer.flip()); _buffer = newbuf; // don't let things grow without bounds