You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2005/06/16 03:48:19 UTC
svn commit: r190849 - in /directory/network:
branches/0.7/src/java/org/apache/mina/common/ByteBuffer.java
trunk/src/java/org/apache/mina/common/ByteBuffer.java
Author: trustin
Date: Wed Jun 15 18:48:18 2005
New Revision: 190849
URL: http://svn.apache.org/viewcvs?rev=190849&view=rev
Log:
Related issue: DIRMINA-62
ByteBuffer.ensureCapacity() always uses newly allocated NIO buffer not using existing pool. I modified it to use allocate0 method instead of directly allocating buffers.
Modified:
directory/network/branches/0.7/src/java/org/apache/mina/common/ByteBuffer.java
directory/network/trunk/src/java/org/apache/mina/common/ByteBuffer.java
Modified: directory/network/branches/0.7/src/java/org/apache/mina/common/ByteBuffer.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/common/ByteBuffer.java?rev=190849&r1=190848&r2=190849&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/common/ByteBuffer.java (original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/common/ByteBuffer.java Wed Jun 15 18:48:18 2005
@@ -1464,8 +1464,7 @@
}
java.nio.ByteBuffer oldBuf = this.buf;
- java.nio.ByteBuffer newBuf = isDirect() ? java.nio.ByteBuffer.allocateDirect( newCapacity ) :
- java.nio.ByteBuffer.allocate( newCapacity );
+ java.nio.ByteBuffer newBuf = allocate0( newCapacity, isDirect() );
int pos = oldBuf.position();
int limit = oldBuf.limit();
Modified: directory/network/trunk/src/java/org/apache/mina/common/ByteBuffer.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/ByteBuffer.java?rev=190849&r1=190848&r2=190849&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/ByteBuffer.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/common/ByteBuffer.java Wed Jun 15 18:48:18 2005
@@ -1464,8 +1464,7 @@
}
java.nio.ByteBuffer oldBuf = this.buf;
- java.nio.ByteBuffer newBuf = isDirect() ? java.nio.ByteBuffer.allocateDirect( newCapacity ) :
- java.nio.ByteBuffer.allocate( newCapacity );
+ java.nio.ByteBuffer newBuf = allocate0( newCapacity, isDirect() );
int pos = oldBuf.position();
int limit = oldBuf.limit();