From 36af272a6309589a6c1f6368e6a614afd484047d Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Mon, 28 Mar 2005 19:32:48 +0000 Subject: [PATCH] Bad idea. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3431 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/io/FramingOutputStream.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/java/com/threerings/io/FramingOutputStream.java b/src/java/com/threerings/io/FramingOutputStream.java index 043151b95..b1d9c0ecd 100644 --- a/src/java/com/threerings/io/FramingOutputStream.java +++ b/src/java/com/threerings/io/FramingOutputStream.java @@ -96,17 +96,13 @@ public class FramingOutputStream extends OutputStream { int ocapacity = _buffer.capacity(); int ncapacity = _buffer.position() + needed; - if (ncapacity <= ocapacity) { - System.err.println("Why would I not expand? " + - "[ocapacity=" + ocapacity + ", ncapacity=" + ncapacity + "]."); - } - //if (ncapacity > ocapacity) { + if (ncapacity > ocapacity) { // increase the buffer size in large increments ncapacity = Math.max(ocapacity << 1, ncapacity); ByteBuffer newbuf = ByteBuffer.allocate(ncapacity); newbuf.put((ByteBuffer)_buffer.flip()); _buffer = newbuf; -// } + } } /**