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/05/09 11:55:23 UTC

svn commit: r169263 - /directory/network/branches/api_integration/src/java/org/apache/mina/common/ByteBuffer.java

Author: trustin
Date: Mon May  9 02:55:22 2005
New Revision: 169263

URL: http://svn.apache.org/viewcvs?rev=169263&view=rev
Log:
Moved buffer initialization code fragments to init()

Modified:
    directory/network/branches/api_integration/src/java/org/apache/mina/common/ByteBuffer.java

Modified: directory/network/branches/api_integration/src/java/org/apache/mina/common/ByteBuffer.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/api_integration/src/java/org/apache/mina/common/ByteBuffer.java?rev=169263&r1=169262&r2=169263&view=diff
==============================================================================
--- directory/network/branches/api_integration/src/java/org/apache/mina/common/ByteBuffer.java (original)
+++ directory/network/branches/api_integration/src/java/org/apache/mina/common/ByteBuffer.java Mon May  9 02:55:22 2005
@@ -200,8 +200,6 @@
                            java.nio.ByteBuffer.allocate( MINIMUM_CAPACITY << idx );
         }
         
-        buf.clear();
-        buf.order( ByteOrder.BIG_ENDIAN );
         return buf;
     }
     
@@ -532,6 +530,8 @@
         private synchronized void init( java.nio.ByteBuffer buf )
         {
             this.buf = buf;
+            buf.clear();
+            buf.order( ByteOrder.BIG_ENDIAN );
             autoExpand = false;
             refCount = 1;
         }