incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1479770 - /sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/OrderedJobQueue.java
Date Tue, 07 May 2013 06:12:12 GMT
Author: cziegeler
Date: Tue May  7 06:12:12 2013
New Revision: 1479770

URL: http://svn.apache.org/r1479770
Log:
SLING-2829 : Ignore empty handler when closing queue

Modified:
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/OrderedJobQueue.java

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/OrderedJobQueue.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/OrderedJobQueue.java?rev=1479770&r1=1479769&r2=1479770&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/OrderedJobQueue.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/OrderedJobQueue.java
Tue May  7 06:12:12 2013
@@ -51,6 +51,15 @@ public final class OrderedJobQueue exten
 
         @Override
         public int compare(final JobHandler o1, final JobHandler o2) {
+            if ( o1.getJob() == null ) {
+                if ( o2.getJob() == null ) {
+                    return 0;
+                }
+                return -1;
+            }
+            if ( o2.getJob() == null ) {
+                return 1;
+            }
             return o1.getJob().getCreated().compareTo(o2.getJob().getCreated());
         }
     });



Mime
View raw message