瀏覽代碼

#4 modify if statement.

Shinsuke Sugaya 11 年之前
父節點
當前提交
6d33d0415f
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/main/java/jp/sf/fess/helper/SystemHelper.java

+ 3 - 3
src/main/java/jp/sf/fess/helper/SystemHelper.java

@@ -246,15 +246,15 @@ public class SystemHelper implements Serializable {
         crawlerCmdList.add("--name");
         crawlerCmdList.add("--name");
         crawlerCmdList.add(Constants.CRAWLING_SESSION_SYSTEM_NAME);
         crawlerCmdList.add(Constants.CRAWLING_SESSION_SYSTEM_NAME);
 
 
-        if (webConfigIds != null) {
+        if (webConfigIds != null && webConfigIds.length > 0) {
             crawlerCmdList.add("-w");
             crawlerCmdList.add("-w");
             crawlerCmdList.add(StringUtils.join(webConfigIds, ','));
             crawlerCmdList.add(StringUtils.join(webConfigIds, ','));
         }
         }
-        if (webConfigIds != null) {
+        if (fileConfigIds != null && fileConfigIds.length > 0) {
             crawlerCmdList.add("-f");
             crawlerCmdList.add("-f");
             crawlerCmdList.add(StringUtils.join(fileConfigIds, ','));
             crawlerCmdList.add(StringUtils.join(fileConfigIds, ','));
         }
         }
-        if (webConfigIds != null) {
+        if (dataConfigIds != null && dataConfigIds.length > 0) {
             crawlerCmdList.add("-d");
             crawlerCmdList.add("-d");
             crawlerCmdList.add(StringUtils.join(dataConfigIds, ','));
             crawlerCmdList.add(StringUtils.join(dataConfigIds, ','));
         }
         }