[hornetq-commits] JBoss hornetq SVN: r12265 - in trunk: tests/integration-tests/src/test/java/org/hornetq/tests/integration/client and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Mar 8 11:05:49 EST 2012


Author: borges
Date: 2012-03-08 11:05:48 -0500 (Thu, 08 Mar 2012)
New Revision: 12265

Modified:
   trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java
   trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java
Log:
Remove dead code

Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java	2012-03-08 16:05:21 UTC (rev 12264)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java	2012-03-08 16:05:48 UTC (rev 12265)
@@ -50,7 +50,7 @@
    // Attributes ----------------------------------------------------
 
    final LargeMessageController bufferDelegate;
-   
+
    // Static --------------------------------------------------------
 
    // Constructors --------------------------------------------------
@@ -64,7 +64,7 @@
    // Public --------------------------------------------------------
 
    /**
-    * 
+    *
     */
    public void discardUnusedPackets()
    {
@@ -102,35 +102,22 @@
    }
 
    /**
-    * 
+    *
     * @param timeWait Milliseconds to Wait. 0 means forever
-    * @throws Exception
     */
    public synchronized boolean waitCompletion(final long timeWait) throws HornetQException
    {
       return bufferDelegate.waitCompletion(timeWait);
    }
 
-   // Channel Buffer Implementation ---------------------------------
-
-   /* (non-Javadoc)
-    * @see org.hornetq.api.core.buffers.ChannelBuffer#array()
-    */
-   public byte[] array()
-   {
-      throw new IllegalAccessError("array not supported on LargeMessageBufferImpl");
-   }
-
-   /* (non-Javadoc)
-    * @see org.hornetq.api.core.buffers.ChannelBuffer#capacity()
-    */
+   @Override
    public int capacity()
    {
       return -1;
    }
    
    DataInputStream dataInput = null;
-   
+
    private DataInputStream getStream()
    {
       if (dataInput == null)
@@ -138,18 +125,18 @@
          try
          {
             InputStream input = new HornetQBufferInputStream(bufferDelegate);
-            
+
             dataInput = new DataInputStream(new InflaterReader(input));
          }
          catch (Exception e)
          {
             throw new RuntimeException (e.getMessage(), e);
          }
-         
+
       }
       return dataInput;
    }
-   
+
    private void positioningNotSupported()
    {
       throw new IllegalStateException("Position not supported over compressed large messages");
@@ -298,9 +285,9 @@
       positioningNotSupported();
       return 0;
    }
-   
-   
 
+
+
    public int getUnsignedMedium(final long index)
    {
       positioningNotSupported();
@@ -577,7 +564,7 @@
    {
       try
       {
-         return (short)getStream().readShort();
+         return getStream().readShort();
       }
       catch (Exception e)
       {
@@ -589,7 +576,7 @@
    {
       try
       {
-         return (int)getStream().readUnsignedShort();
+         return getStream().readUnsignedShort();
       }
       catch (Exception e)
       {
@@ -607,7 +594,7 @@
       return value;
    }
 
-   
+
    public int readUnsignedMedium()
    {
       return (readByte() & 0xff) << 16 | (readByte() & 0xff) << 8 | (readByte() & 0xff) << 0;
@@ -706,7 +693,7 @@
 
    public void skipBytes(final int length)
    {
-    
+
       try
       {
          for (int i = 0 ; i < length; i++)
@@ -825,7 +812,7 @@
    {
       return (char)readShort();
    }
-   
+
    public char getChar(final int index)
    {
       return (char)getShort(index);

Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java	2012-03-08 16:05:21 UTC (rev 12264)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java	2012-03-08 16:05:48 UTC (rev 12265)
@@ -140,7 +140,7 @@
    {
       ArrayList<ClientMessage> list = new ArrayList<ClientMessage>();
 
-      private CountDownLatch latch;
+      private final CountDownLatch latch;
 
       private final boolean acknowledge;
 
@@ -166,11 +166,5 @@
          }
          latch.countDown();
       }
-
-      public void reset(final CountDownLatch latch)
-      {
-         list.clear();
-         this.latch = latch;
-      }
    }
 }



More information about the hornetq-commits mailing list