[hornetq-commits] JBoss hornetq SVN: r12227 - in trunk/hornetq-core/src/main/java/org/hornetq: utils and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Mar 1 14:59:25 EST 2012


Author: clebert.suconic
Date: 2012-03-01 14:59:23 -0500 (Thu, 01 Mar 2012)
New Revision: 12227

Modified:
   trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerConsumerImpl.java
   trunk/hornetq-core/src/main/java/org/hornetq/utils/LinkedListImpl.java
Log:
JBPAPP-8282 - merge on trunk

Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerConsumerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerConsumerImpl.java	2012-03-01 19:58:56 UTC (rev 12226)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerConsumerImpl.java	2012-03-01 19:59:23 UTC (rev 12227)
@@ -252,19 +252,22 @@
             }
             return HandleStatus.BUSY;
          }
-
-         if (log.isTraceEnabled())
-         {
-            log.trace("Handling reference " + ref);
-         }
-
          final ServerMessage message = ref.getMessage();
 
          if (filter != null && !filter.match(message))
          {
+            if (log.isTraceEnabled())
+            {
+               log.trace("Reference " + ref + " is a noMatch on consumer " + this);
+            }
             return HandleStatus.NO_MATCH;
          }
 
+         if (log.isTraceEnabled())
+         {
+            log.trace("Handling reference " + ref);
+         }
+
          if (!browseOnly)
          {
             if (!preAcknowledge)

Modified: trunk/hornetq-core/src/main/java/org/hornetq/utils/LinkedListImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/utils/LinkedListImpl.java	2012-03-01 19:58:56 UTC (rev 12226)
+++ trunk/hornetq-core/src/main/java/org/hornetq/utils/LinkedListImpl.java	2012-03-01 19:59:23 UTC (rev 12227)
@@ -34,7 +34,7 @@
 
    private static final int INITIAL_ITERATOR_ARRAY_SIZE = 10;
 
-   private Node<E> head = new Node<E>(null);
+   private final Node<E> head = new Node<E>(null);
 
    private Node<E> tail = null;
 
@@ -55,7 +55,7 @@
    public void addHead(E e)
    {
       Node<E> node = new Node<E>(e);
-
+      
       node.next = head.next;
 
       node.prev = head;
@@ -66,6 +66,11 @@
       {
          tail = node;
       }
+      else
+      {
+         // Need to set the previous element on the former head
+         node.next.prev = node;
+      }
 
       size++;
    }



More information about the hornetq-commits mailing list