Author: degenaro
Date: Wed Feb 17 21:42:56 2016
New Revision: 1730950

URL: http://svn.apache.org/viewvc?rev=1730950&view=rev
Log:
UIMA-4577 DUCC Web Server (WS) should test for empty string (in addition to 
null) when accounting for number of service implementor instances (obtained 
from DB)

Modified:
    
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccDataHelper.java

Modified: 
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccDataHelper.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccDataHelper.java?rev=1730950&r1=1730949&r2=1730950&view=diff
==============================================================================
--- 
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccDataHelper.java
 (original)
+++ 
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccDataHelper.java
 Wed Feb 17 21:42:56 2016
@@ -71,19 +71,22 @@ public class DuccDataHelper {
         String implementors = meta.getProperty(IServicesRegistry.implementors);
         String[] ret = new String[0];
         if(implementors != null) {
-            String[] tempArray = implementors.trim().split("\\s+");
-            ret = new String[tempArray.length];
-            int i = 0;
-            for (String s : tempArray) {
-                // Back compatibility for the shadow web servers, if no inst 
id then
-                // just return the 's'
-                if ( s.indexOf(".") > 0 ) {
-                    String[] id_inst = s.split("\\.");
-                    ret[i++] = id_inst[0].trim();
-                } else {
-                    ret[i++] = s;
+               implementors = implementors.trim();
+               if(implementors.length() > 0) {
+                       String[] tempArray = implementors.trim().split("\\s+");
+                ret = new String[tempArray.length];
+                int i = 0;
+                for (String s : tempArray) {
+                    // Back compatibility for the shadow web servers, if no 
inst id then
+                    // just return the 's'
+                    if ( s.indexOf(".") > 0 ) {
+                        String[] id_inst = s.split("\\.");
+                        ret[i++] = id_inst[0].trim();
+                    } else {
+                        ret[i++] = s;
+                    }
                 }
-            }
+               }
         }
         return ret;
     }


Reply via email to