[jboss-cvs] JBoss Messaging SVN: r4821 - trunk/src/main/org/jboss/messaging/core/remoting/impl/netty.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Aug 18 06:35:42 EDT 2008


Author: trustin
Date: 2008-08-18 06:35:41 -0400 (Mon, 18 Aug 2008)
New Revision: 4821

Modified:
   trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/ChannelBufferWrapper.java
Log:
Made sure the specified size is not a negative integer in ChannelBufferWrapper

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/ChannelBufferWrapper.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/ChannelBufferWrapper.java	2008-08-18 10:32:53 UTC (rev 4820)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/ChannelBufferWrapper.java	2008-08-18 10:35:41 UTC (rev 4821)
@@ -58,6 +58,10 @@
 
    public ChannelBufferWrapper(final int size)
    {
+      if (size < 0) {
+         throw new IllegalArgumentException("size: " + size);
+      }
+
       buffer = dynamicBuffer(size);
       buffer.writerIndex(buffer.capacity());
    }




More information about the jboss-cvs-commits mailing list