incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1043465 - /sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/QueueConfigurationManager.java
Date Wed, 08 Dec 2010 15:53:21 GMT
Author: cziegeler
Date: Wed Dec  8 15:53:21 2010
New Revision: 1043465

URL: http://svn.apache.org/viewvc?rev=1043465&view=rev
Log:
Fix queue configuration detection if queue name is provided in the job event.

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

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/QueueConfigurationManager.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/QueueConfigurationManager.java?rev=1043465&r1=1043464&r2=1043465&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/QueueConfigurationManager.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/QueueConfigurationManager.java
Wed Dec  8 15:53:21 2010
@@ -110,19 +110,16 @@ public class QueueConfigurationManager {
      */
     public InternalQueueConfiguration getQueueConfiguration(final JobEvent event) {
         final InternalQueueConfiguration[] configurations = this.getConfigurations();
-        // check for queue name first
         final String queueName = (String)event.event.getProperty(JobUtil.PROPERTY_JOB_QUEUE_NAME);
         for(final InternalQueueConfiguration config : configurations) {
             if ( config.isValid() ) {
-                if ( queueName != null ) {
-                    if ( queueName.equals(config.getName()) ) {
-                        event.queueName = queueName;
-                        return config;
-                    }
-                } else {
-                    if ( config.match(event) ) {
-                        return config;
-                    }
+                // check for queue name first
+                if ( queueName != null && queueName.equals(config.getName()) ) {
+                    event.queueName = queueName;
+                    return config;
+                }
+                if ( config.match(event) ) {
+                    return config;
                 }
             }
         }



Mime
View raw message