You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2016/07/19 06:48:43 UTC
svn commit: r1753339 -
/sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java
Author: cziegeler
Date: Tue Jul 19 06:48:43 2016
New Revision: 1753339
URL: http://svn.apache.org/viewvc?rev=1753339&view=rev
Log:
SLING-5831 : Support different thread pools for scheduled tasks
Modified:
sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java
Modified: sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java?rev=1753339&r1=1753338&r2=1753339&view=diff
==============================================================================
--- sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java (original)
+++ sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java Tue Jul 19 06:48:43 2016
@@ -134,11 +134,15 @@ public class QuartzScheduler implements
} else if ( value != null ) {
this.allowedPoolNames = new String[] {value.toString()};
}
- for(int i=0;i<this.allowedPoolNames.length;i++) {
- if ( this.allowedPoolNames[i] == null ) {
- this.allowedPoolNames[i] = "";
- } else {
- this.allowedPoolNames[i] = this.allowedPoolNames[i].trim();
+ if ( this.allowedPoolNames == null ) {
+ this.allowedPoolNames = new String[0];
+ } else {
+ for(int i=0;i<this.allowedPoolNames.length;i++) {
+ if ( this.allowedPoolNames[i] == null ) {
+ this.allowedPoolNames[i] = "";
+ } else {
+ this.allowedPoolNames[i] = this.allowedPoolNames[i].trim();
+ }
}
}
ctx.addBundleListener(this);