directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject 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
Date Thu, 16 Jun 2005 01:48:19 GMT
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();



Mime
View raw message