incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1298510 - /incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
Date Thu, 08 Mar 2012 18:58:36 GMT
Author: kwright
Date: Thu Mar  8 18:58:36 2012
New Revision: 1298510

URL: http://svn.apache.org/viewvc?rev=1298510&view=rev
Log:
Fix an NPE bug in CMIS UI.

Modified:
    incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java

Modified: incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java?rev=1298510&r1=1298509&r2=1298510&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
(original)
+++ incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
Thu Mar  8 18:58:36 2012
@@ -881,19 +881,16 @@ public class CmisRepositoryConnector ext
   public void viewSpecification(IHTTPOutput out, Locale locale, DocumentSpecification ds)
       throws ManifoldCFException, IOException {
     int i = 0;
-    boolean seenAny = false;
     ConfigParams specificationParams = new ConfigParams();
+    String cmisQuery = "";
     while (i < ds.getChildCount()) {
       SpecificationNode sn = ds.getChild(i);
       if (sn.getType().equals(JOB_STARTPOINT_NODE_TYPE)) {
-        if (seenAny == false) {
-          seenAny = true;
-        }
-        specificationParams.setParameter(
-            CmisConfig.CMIS_QUERY_PARAM.toUpperCase(), sn.getAttributeValue(CmisConfig.CMIS_QUERY_PARAM));
+        cmisQuery = sn.getAttributeValue(CmisConfig.CMIS_QUERY_PARAM);
       }
       i++;
     }
+    specificationParams.setParameter(CmisConfig.CMIS_QUERY_PARAM.toUpperCase(), cmisQuery);
     outputResource(VIEW_SPEC_FORWARD, out, locale, specificationParams);
   }
 



Mime
View raw message