manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1756230 [1/2] - in /manifoldcf/trunk: ./ connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/ connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/...
Date Fri, 12 Aug 2016 22:20:01 GMT
Author: kwright
Date: Fri Aug 12 22:20:00 2016
New Revision: 1756230

URL: http://svn.apache.org/viewvc?rev=1756230&view=rev
Log:
Fix for CONNECTORS-1332.  Committed on behalf of Furkan KAMACI.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/build.xml
    manifoldcf/trunk/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/AlfrescoConnector.java
    manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/APISanityHSQLDBIT.java
    manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/CMISUtils.java
    manifoldcf/trunk/connectors/alfresco/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfresco/tests/APISanityHSQLDBIT.java
    manifoldcf/trunk/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/amazons3/AmazonS3DocumentProcessUtility.java
    manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
    manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnectorUtils.java
    manifoldcf/trunk/connectors/cmis/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/cmis/tests/APISanityHSQLDBIT.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/ConfluenceRepositoryConnector.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/client/ConfluenceClient.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Page.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/PageType.java
    manifoldcf/trunk/connectors/confluence/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/confluence/tests/ConfluenceConnectorTest.java
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java
    manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/DCTM/AuthorityConnector.java
    manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/MatchMap.java
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
    manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
    manifoldcf/trunk/connectors/filenet/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filenet/FilenetConnector.java
    manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConfig.java
    manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConnector.java
    manifoldcf/trunk/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java
    manifoldcf/trunk/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/api/BooleanAdapter.java
    manifoldcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/GTSConnector.java
    manifoldcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/HttpPoster.java
    manifoldcf/trunk/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConfig.java
    manifoldcf/trunk/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConnector.java
    manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/MatchMap.java
    manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
    manifoldcf/trunk/connectors/kafka/connector/src/main/java/org/apache/manifoldcf/agents/output/kafka/KafkaMessage.java
    manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
    manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/MatchMap.java
    manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MatchMap.java
    manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConfig.java
    manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerIndex.java
    manifoldcf/trunk/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/MatchMap.java
    manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
    manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Robots.java
    manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/SetSeedList.java
    manifoldcf/trunk/connectors/rss/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/rss/tests/MockRSSService.java
    manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxClient.java
    manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxConnector.java
    manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxDocument.java
    manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/MatchMap.java
    manifoldcf/trunk/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/MockSolrService.java
    manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FindHTMLFormHandler.java
    manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FormDataAccumulator.java
    manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FormParseState.java
    manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/RobotsManager.java
    manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
    manifoldcf/trunk/connectors/webcrawler/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/webcrawler/tests/MockSessionWebService.java
    manifoldcf/trunk/connectors/webcrawler/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/webcrawler/tests/MockWebService.java
    manifoldcf/trunk/framework/build.xml
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/common/DateParser.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/banner.jsp
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/resultreport.jsp
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
    manifoldcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/ScriptParser.java
    manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java
    manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Formatter.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Fri Aug 12 22:20:00 2016
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 2.5-dev =====================
 
+CONNECTORS-1332: Add check for forbidden api's to ant build.
+(Furkan KAMACI)
+
 CONNECTORS-1238: Update to use SolrJ 5.5.2, ZooKeeper 3.4.8.
 (Karl Wright)
 

Modified: manifoldcf/trunk/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/build.xml?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/build.xml (original)
+++ manifoldcf/trunk/build.xml Fri Aug 12 22:20:00 2016
@@ -494,7 +494,7 @@
         <ant dir="framework" target="clean"/>
     </target>
 
-    <target name="build" depends="deliver-connectors"/>
+    <target name="build" depends="deliver-connectors, forbidden-checks"/>
     <target name="tmpclean" depends="cleanup-afterbuild"/>
     <target name="buildcln" depends="build,tmpclean"/>
     <target name="javadoc" depends="deliver-connectors-doc"/>
@@ -2374,8 +2374,19 @@ Use Apache Forrest version forrest-0.9-d
             <param name="artifact-type" value="jar"/>
         </antcall>
     </target>
-  
-    <target name="make-core-deps" depends="download-kafka-client,download-joda-time,download-aws-sdk,download-resteasy,download-jsoup,download-mockito,download-alfresco-webscript-plugin,download-alfresco-indexer-client,download-mongo-java-driver,download-jira-client,download-google-api-client,download-dropbox-client,download-solrj,download-zookeeper,download-httpcomponents,download-json,download-hsqldb,download-xerces,download-commons,download-elasticsearch-plugin,download-solr-plugins,download-sharepoint-plugins,download-jstl,download-xmlgraphics-commons,download-woodstox,download-xmlsec,download-xml-apis,download-wss4j,download-velocity,download-streambuffer,download-stax,download-servlet-api,download-xml-resolver,download-osgi,download-opensaml,download-mimepull,download-mail,download-log4j,download-junit,download-jaxws,download-glassfish,download-jaxb,download-tomcat,download-h2,download-h2-support,download-geronimo-specs,download-fop,download-postgresql,download-axis,download-s
 aaj,download-wsdl4j,download-castor,download-jetty,download-slf4j,download-xalan,download-activation,download-avalon-framework,download-poi,download-chemistry,download-ecj,download-hadoop,download-htrace,download-protobuf,download-tika,download-jackson">
+
+    <target name="download-forbidden-checks">
+        <mkdir dir="lib"/>
+        <antcall target="download-via-maven">
+            <param name="project-path" value="de/thetaphi"/>
+            <param name="artifact-version" value="2.2"/>
+            <param name="target" value="lib"/>
+            <param name="artifact-name" value="forbiddenapis"/>
+            <param name="artifact-type" value="jar"/>
+        </antcall>
+    </target>
+
+    <target name="make-core-deps" depends="download-forbidden-checks,download-kafka-client,download-joda-time,download-aws-sdk,download-resteasy,download-jsoup,download-mockito,download-alfresco-webscript-plugin,download-alfresco-indexer-client,download-mongo-java-driver,download-jira-client,download-google-api-client,download-dropbox-client,download-solrj,download-zookeeper,download-httpcomponents,download-json,download-hsqldb,download-xerces,download-commons,download-elasticsearch-plugin,download-solr-plugins,download-sharepoint-plugins,download-jstl,download-xmlgraphics-commons,download-woodstox,download-xmlsec,download-xml-apis,download-wss4j,download-velocity,download-streambuffer,download-stax,download-servlet-api,download-xml-resolver,download-osgi,download-opensaml,download-mimepull,download-mail,download-log4j,download-junit,download-jaxws,download-glassfish,download-jaxb,download-tomcat,download-h2,download-h2-support,download-geronimo-specs,download-fop,download-postgresq
 l,download-axis,download-saaj,download-wsdl4j,download-castor,download-jetty,download-slf4j,download-xalan,download-activation,download-avalon-framework,download-poi,download-chemistry,download-ecj,download-hadoop,download-htrace,download-protobuf,download-tika,download-jackson">
         <copy todir="lib">
             <fileset dir="lib-license" includes="*.txt"/>
         </copy>
@@ -2430,5 +2441,9 @@ Use Apache Forrest version forrest-0.9-d
     <target name="clean-deps" depends="download-proprietary-cleanup,cleanup-connectors-dependencies">
         <ant dir="site" target="download-cleanup"/>
     </target>
+
+    <target name="forbidden-checks">
+        <ant dir="framework" target="forbidden-checks"/>
+    </target>
     
 </project>

Modified: manifoldcf/trunk/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/AlfrescoConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/AlfrescoConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/AlfrescoConnector.java (original)
+++ manifoldcf/trunk/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/AlfrescoConnector.java Fri Aug 12 22:20:00 2016
@@ -179,7 +179,8 @@ public class AlfrescoConnector extends B
       }
 
       if (Logging.connectors != null && Logging.connectors.isDebugEnabled())
-        Logging.connectors.debug(MessageFormat.format("Starting from transaction id: {0} and acl changeset id: {1}", new Object[]{lastTransactionId, lastAclChangesetId}));
+        Logging.connectors.debug(new MessageFormat("Starting from transaction id: {0} and acl changeset id: {1}", Locale.ROOT)
+            .format(new Object[]{lastTransactionId, lastAclChangesetId}));
 
       long transactionIdsProcessed;
       long aclChangesetsProcessed;
@@ -197,7 +198,8 @@ public class AlfrescoConnector extends B
           count++;
         }
         if (Logging.connectors != null && Logging.connectors.isDebugEnabled())
-          Logging.connectors.debug(MessageFormat.format("Fetched and added {0} seed documents", new Object[]{new Integer(count)}));
+          Logging.connectors.debug(new MessageFormat("Fetched and added {0} seed documents", Locale.ROOT)
+              .format(new Object[]{new Integer(count)}));
 
         transactionIdsProcessed = response.getLastTransactionId() - lastTransactionId;
         aclChangesetsProcessed = response.getLastAclChangesetId() - lastAclChangesetId;
@@ -206,11 +208,13 @@ public class AlfrescoConnector extends B
         lastAclChangesetId = response.getLastAclChangesetId();
 
         if (Logging.connectors != null && Logging.connectors.isDebugEnabled())
-          Logging.connectors.debug(MessageFormat.format("transaction_id={0}, acl_changeset_id={1}", new Object[]{lastTransactionId, lastAclChangesetId}));
+          Logging.connectors.debug(new MessageFormat("transaction_id={0}, acl_changeset_id={1}", Locale.ROOT)
+              .format(new Object[]{lastTransactionId, lastAclChangesetId}));
       } while (transactionIdsProcessed > 0 || aclChangesetsProcessed > 0);
 
       if (Logging.connectors != null && Logging.connectors.isDebugEnabled())
-        Logging.connectors.debug(MessageFormat.format("Recording {0} as last transaction id and {1} as last changeset id", new Object[]{lastTransactionId, lastAclChangesetId}));
+        Logging.connectors.debug(new MessageFormat("Recording {0} as last transaction id and {1} as last changeset id", Locale.ROOT)
+            .format(new Object[]{lastTransactionId, lastAclChangesetId}));
       return lastTransactionId + "|" + lastAclChangesetId;
     } catch (AlfrescoDownException e) {
       handleAlfrescoDownException(e,"seeding");
@@ -239,7 +243,8 @@ public class AlfrescoConnector extends B
         AlfrescoResponse response = alfrescoClient.fetchNode(doc);
         if(response.getDocumentList().isEmpty()){ // Not found seeded document. Could reflect an error in Alfresco
           if (Logging.connectors != null)
-            Logging.connectors.warn(MessageFormat.format("Invalid Seeded Document from Alfresco with ID {0}", new Object[]{doc}));
+            Logging.connectors.warn(new MessageFormat("Invalid Seeded Document from Alfresco with ID {0}", Locale.ROOT)
+                .format(new Object[]{doc}));
           activities.deleteDocument(doc);
           continue;
         }
@@ -402,7 +407,8 @@ public class AlfrescoConnector extends B
         try {
           rd.setBinary(stream, length);
           if (Logging.connectors != null && Logging.connectors.isDebugEnabled())
-            Logging.connectors.debug(MessageFormat.format("Ingesting with id: {0}, URI {1} and rd {2}", new Object[]{uuid, nodeRef, rd.getFileName()}));
+            Logging.connectors.debug(new MessageFormat("Ingesting with id: {0}, URI {1} and rd {2}", Locale.ROOT)
+                .format(new Object[]{uuid, nodeRef, rd.getFileName()}));
           activities.ingestDocumentWithException(doc, documentVersion, contentUrlPath, rd);
           errorCode = "OK";
           fileLengthLong = new Long(length);

Modified: manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/APISanityHSQLDBIT.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/APISanityHSQLDBIT.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/APISanityHSQLDBIT.java (original)
+++ manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/APISanityHSQLDBIT.java Fri Aug 12 22:20:00 2016
@@ -29,10 +29,11 @@ import org.junit.Test;
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.Locale;
 
 public class APISanityHSQLDBIT extends BaseITHSQLDB
 {
-  private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHss");
+  private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHss", Locale.ROOT);
 
   //@TODO - Should be moved into AlfrescoConnector.java
   public static final String ALFRESCO_PROTOCOL_PARAM = "protocol";

Modified: manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/CMISUtils.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/CMISUtils.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/CMISUtils.java (original)
+++ manifoldcf/trunk/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/CMISUtils.java Fri Aug 12 22:20:00 2016
@@ -27,6 +27,7 @@ import org.apache.chemistry.opencmis.com
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -65,7 +66,7 @@ public class CMISUtils {
     properties.put(PropertyIds.IS_LATEST_MAJOR_VERSION, true);
 
     String docText = "Lorem ipsum";
-    byte[] content = docText.getBytes();
+    byte[] content = docText.getBytes(StandardCharsets.UTF_8);
     InputStream stream = new ByteArrayInputStream(content);
     ContentStream contentStream = session.getObjectFactory().createContentStream(
         filename,

Modified: manifoldcf/trunk/connectors/alfresco/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfresco/tests/APISanityHSQLDBIT.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/alfresco/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfresco/tests/APISanityHSQLDBIT.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/alfresco/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfresco/tests/APISanityHSQLDBIT.java (original)
+++ manifoldcf/trunk/connectors/alfresco/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfresco/tests/APISanityHSQLDBIT.java Fri Aug 12 22:20:00 2016
@@ -126,7 +126,7 @@ public class APISanityHSQLDBIT extends B
   
       //write the content in the new node
       ContentServiceSoapBindingStub contentService = WebServiceFactory.getContentService();
-      contentService.write(reference, Constants.PROP_CONTENT, content.getBytes(), contentFormat);
+      contentService.write(reference, Constants.PROP_CONTENT, content.getBytes(StandardCharsets.UTF_8), contentFormat);
       
     } finally{
       AuthenticationUtils.endSession();
@@ -165,7 +165,7 @@ public class APISanityHSQLDBIT extends B
       contentFormat.setMimetype("text/plain");
       
       ContentServiceSoapBindingStub contentService = WebServiceFactory.getContentService();
-      contentService.write(reference, Constants.PROP_CONTENT, newContent.getBytes(), contentFormat);
+      contentService.write(reference, Constants.PROP_CONTENT, newContent.getBytes(StandardCharsets.UTF_8), contentFormat);
       
     } finally {
       AuthenticationUtils.endSession();

Modified: manifoldcf/trunk/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/amazons3/AmazonS3DocumentProcessUtility.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/amazons3/AmazonS3DocumentProcessUtility.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/amazons3/AmazonS3DocumentProcessUtility.java (original)
+++ manifoldcf/trunk/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/amazons3/AmazonS3DocumentProcessUtility.java Fri Aug 12 22:20:00 2016
@@ -17,6 +17,7 @@
 package org.apache.manifoldcf.crawler.connectors.amazons3;
 
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
@@ -68,7 +69,7 @@ public class AmazonS3DocumentProcessUtil
    * @return
    */
   protected String getDocumentURI(S3Artifact s3Artifact) {
-    return String.format(AmazonS3Config.DOCUMENT_URI_FORMAT,
+    return String.format(Locale.ROOT, AmazonS3Config.DOCUMENT_URI_FORMAT,
         s3Artifact.getBucketName(), s3Artifact.getKey());
   }
 

Modified: manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java (original)
+++ manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java Fri Aug 12 22:20:00 2016
@@ -85,7 +85,7 @@ public class CmisRepositoryConnector ext
   private static final String CMIS_FOLDER_BASE_TYPE = "cmis:folder";
   private static final String CMIS_DOCUMENT_BASE_TYPE = "cmis:document";
   private static final SimpleDateFormat ISO8601_DATE_FORMATTER = new SimpleDateFormat(
-      "yyyy-MM-dd'T'HH:mm:ssZ");
+      "yyyy-MM-dd'T'HH:mm:ssZ", Locale.ROOT);
 
   // Tab name properties
 

Modified: manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnectorUtils.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnectorUtils.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnectorUtils.java (original)
+++ manifoldcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnectorUtils.java Fri Aug 12 22:20:00 2016
@@ -21,11 +21,8 @@ package org.apache.manifoldcf.crawler.co
 import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.math.BigInteger;
-import java.util.GregorianCalendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
+import java.util.*;
+
 import org.apache.chemistry.opencmis.client.api.Document;
 import org.apache.chemistry.opencmis.client.api.Property;
 import org.apache.chemistry.opencmis.client.api.Session;
@@ -139,7 +136,7 @@ public class CmisRepositoryConnectorUtil
    */
   public static boolean existsInSelectClause(String cmisQuery, String propertyId) {
         String selectClause = getSelectClause(cmisQuery);
-        if (selectClause.toLowerCase().startsWith(SELECT_STAR_CLAUSE)) {
+        if (selectClause.toLowerCase(Locale.ROOT).startsWith(SELECT_STAR_CLAUSE)) {
             return true;
         } else {
             StringTokenizer cmisQueryTokenized = new StringTokenizer(cmisQuery.trim());
@@ -354,7 +351,7 @@ public class CmisRepositoryConnectorUtil
 
         int idx = orig.indexOf(sep);
         if (idx < 0) {
-            idx = orig.indexOf(sep.toUpperCase());
+            idx = orig.indexOf(sep.toUpperCase(Locale.ROOT));
         }
 
         if (idx > 1) {
@@ -377,6 +374,6 @@ public class CmisRepositoryConnectorUtil
 
     //check if the query is a select *
     public static boolean isWildcardQuery(String selectClause) {
-        return selectClause.toLowerCase().startsWith(SELECT_STAR_CLAUSE);
+        return selectClause.toLowerCase(Locale.ROOT).startsWith(SELECT_STAR_CLAUSE);
     }
 }
\ No newline at end of file

Modified: manifoldcf/trunk/connectors/cmis/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/cmis/tests/APISanityHSQLDBIT.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/cmis/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/cmis/tests/APISanityHSQLDBIT.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/cmis/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/cmis/tests/APISanityHSQLDBIT.java (original)
+++ manifoldcf/trunk/connectors/cmis/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/cmis/tests/APISanityHSQLDBIT.java Fri Aug 12 22:20:00 2016
@@ -22,6 +22,7 @@ import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.math.BigInteger;
+import java.nio.charset.StandardCharsets;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -101,7 +102,7 @@ public class APISanityHSQLDBIT extends B
   
     // content
     String contentString = "CMIS Testdata "+name;
-    byte[] content = contentString.getBytes();
+    byte[] content = contentString.getBytes(StandardCharsets.UTF_8);
     InputStream stream = new ByteArrayInputStream(content);
     ContentStream contentStream = new ContentStreamImpl(name, new BigInteger(content), "text/plain", stream);
   
@@ -124,7 +125,7 @@ public class APISanityHSQLDBIT extends B
       objectId = result.getPropertyById("cmis:objectId").getFirstValue().toString();
     }
 
-    byte[] newContentByteArray = newContent.getBytes();
+    byte[] newContentByteArray = newContent.getBytes(StandardCharsets.UTF_8);
     InputStream stream = new ByteArrayInputStream(newContentByteArray);
     ContentStream contentStream = new ContentStreamImpl(name, new BigInteger(newContentByteArray), "text/plain", stream);
     Document documentToUpdate = (Document) session.getObject(objectId);

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/ConfluenceRepositoryConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/ConfluenceRepositoryConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/ConfluenceRepositoryConnector.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/ConfluenceRepositoryConnector.java Fri Aug 12 22:20:00 2016
@@ -515,12 +515,12 @@ public class ConfluenceRepositoryConnect
    * </p>
    * 
    * @param newMap
-   * @param ds
+   * @param cs
    */
   private void fillInConfSpacesSpecificationMap(Map<String, Object> newMap,
       ConfluenceSpecification cs) {
 
-    newMap.put(ConfluenceConfiguration.Specification.SPACES.toUpperCase(),
+    newMap.put(ConfluenceConfiguration.Specification.SPACES.toUpperCase(Locale.ROOT),
         cs.getSpaces());
   }
 
@@ -530,14 +530,14 @@ public class ConfluenceRepositoryConnect
    * </p>
    * 
    * @param newMap
-   * @param ds
+   * @param cs
    */
   private void fillInConfPagesSpecificationMap(Map<String, Object> newMap,
       ConfluenceSpecification cs) {
 
     newMap.put(
         ConfluenceConfiguration.Specification.PROCESS_ATTACHMENTS_ATTRIBUTE_KEY
-            .toUpperCase(), cs.isProcessAttachments());
+            .toUpperCase(Locale.ROOT), cs.isProcessAttachments());
     return;
 
   }
@@ -788,9 +788,8 @@ public class ConfluenceRepositoryConnect
     if (Logging.connectors != null && Logging.connectors.isDebugEnabled()) {
       String spaceDesc = space.isPresent() ? "space with key "
           + space.get() : "all the spaces";
-      Logging.connectors.debug(MessageFormat.format(
-          "Starting from {0} and size {1} for {2}", new Object[] {
-              lastStart, defaultSize, spaceDesc }));
+      Logging.connectors.debug(new MessageFormat("Starting from {0} and size {1} for {2}", Locale.ROOT)
+          .format(new Object[] { lastStart, defaultSize, spaceDesc }));
     }
 
     try {
@@ -810,17 +809,15 @@ public class ConfluenceRepositoryConnect
         }
         if (Logging.connectors != null
             && Logging.connectors.isDebugEnabled())
-          Logging.connectors.debug(MessageFormat.format(
-              "Fetched and added {0} seed documents",
-              new Object[] { new Integer(count) }));
+          Logging.connectors.debug(new MessageFormat("Fetched and added {0} seed documents", Locale.ROOT)
+              .format(new Object[] { new Integer(count) }));
 
         lastStart += count;
         isLast = response.isLast();
         if (Logging.connectors != null
             && Logging.connectors.isDebugEnabled())
-          Logging.connectors.debug(MessageFormat.format(
-              "New start {0} and size {1}", new Object[] {
-                  lastStart, defaultSize }));
+          Logging.connectors.debug(new MessageFormat("New start {0} and size {1}", Locale.ROOT)
+              .format(new Object[] { lastStart, defaultSize }));
       } while (!isLast);
 
     } catch (Exception e) {
@@ -843,11 +840,8 @@ public class ConfluenceRepositoryConnect
     long defaultSize = 50;
 
     if (Logging.connectors != null && Logging.connectors.isDebugEnabled()) {
-      Logging.connectors
-          .debug(MessageFormat
-              .format("Processing page {} attachments starting from {} and size {}",
-                  new Object[] { page.getId(), lastStart,
-                      defaultSize }));
+      Logging.connectors.debug(new MessageFormat("Processing page {} attachments starting from {} and size {}", Locale.ROOT)
+          .format(new Object[] { page.getId(), lastStart, defaultSize }));
     }
 
     try {
@@ -867,19 +861,16 @@ public class ConfluenceRepositoryConnect
 
         if (Logging.connectors != null
             && Logging.connectors.isDebugEnabled())
-          Logging.connectors
-              .debug(MessageFormat
-                  .format("Fetched and added {} seed document attachments for page {}",
-                      new Object[] { new Integer(count),
-                          page.getId() }));
+          Logging.connectors.debug(
+              new MessageFormat("Fetched and added {} seed document attachments for page {}" , Locale.ROOT)
+                  .format(new Object[] { new Integer(count), page.getId() }));
 
         lastStart += count;
         isLast = response.isLast();
         if (Logging.connectors != null
             && Logging.connectors.isDebugEnabled())
-          Logging.connectors.debug(MessageFormat.format(
-              "New start {0} and size {1}", new Object[] {
-                  lastStart, defaultSize }));
+          Logging.connectors.debug(new MessageFormat("New start {0} and size {1}", Locale.ROOT)
+              .format(new Object[] { lastStart, defaultSize }));
       } while (!isLast);
 
     } catch (Exception e) {
@@ -1062,7 +1053,7 @@ public class ConfluenceRepositoryConnect
     RepositoryDocument rd = new RepositoryDocument();
     Date createdDate = page.getCreatedDate();
     Date lastModified = page.getLastModifiedDate();
-    DateFormat df = DateFormat.getDateTimeInstance();
+    DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.ROOT);
 
     /*
      * Retain page in Manifold because it has not changed from last time

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/client/ConfluenceClient.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/client/ConfluenceClient.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/client/ConfluenceClient.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/client/ConfluenceClient.java Fri Aug 12 22:20:00 2016
@@ -21,6 +21,7 @@ import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.nio.charset.Charset;
 import java.util.List;
+import java.util.Locale;
 
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.io.IOUtils;
@@ -200,7 +201,7 @@ public class ConfluenceClient {
         connect();
       }
 
-      String url = String.format("%s://%s:%s/%s/%s?limit=1", protocol, host,
+      String url = String.format(Locale.ROOT, "%s://%s:%s/%s/%s?limit=1", protocol, host,
           port, path, CONTENT_PATH);
       logger.debug(
           "[Processing] Hitting url: {} for confluence status check fetching : ",
@@ -261,7 +262,7 @@ public class ConfluenceClient {
       httpGet.addHeader(
           "Authorization",
           "Basic "
-              + Base64.encodeBase64String(String.format("%s:%s",
+              + Base64.encodeBase64String(String.format(Locale.ROOT, "%s:%s",
                   this.username, this.password).getBytes(
                   Charset.forName("UTF-8"))));
     }
@@ -295,10 +296,10 @@ public class ConfluenceClient {
   @SuppressWarnings("unchecked")
   public ConfluenceResponse<Page> getPages(int start, int limit,
       Optional<String> space) throws Exception {
-    String url = String.format("%s://%s:%s/%s/%s?limit=%s&start=%s", protocol,
+    String url = String.format(Locale.ROOT, "%s://%s:%s/%s/%s?limit=%s&start=%s", protocol,
         host, port, path, CONTENT_PATH, limit, start);
     if (space.isPresent()) {
-      url = String.format("%s&spaceKey=%s", url, space.get());
+      url = String.format(Locale.ROOT, "%s&spaceKey=%s", url, space.get());
     }
     return (ConfluenceResponse<Page>) getConfluenceResources(url, Page.builder());
   }
@@ -374,7 +375,7 @@ public class ConfluenceClient {
    */
   public ConfluenceResponse<Attachment> getPageAttachments(String pageId, int start,
       int limit) throws Exception {
-    String url = String.format("%s://%s:%s/%s/%s/%s%s?limit=%s&start=%s",
+    String url = String.format(Locale.ROOT, "%s://%s:%s/%s/%s/%s%s?limit=%s&start=%s",
         protocol, host, port, path, CONTENT_PATH, pageId, CHILD_ATTACHMENTS_PATH,
         limit, start);
     @SuppressWarnings("unchecked")
@@ -393,7 +394,7 @@ public class ConfluenceClient {
    */
   public Attachment getAttachment(String attachmentId) {
     String url = String
-        .format("%s://%s:%s/%s/%s/%s?%s",
+        .format(Locale.ROOT, "%s://%s:%s/%s/%s/%s?%s",
             protocol, host, port, path, CONTENT_PATH, attachmentId, EXPANDABLE_PARAMETERS);
     logger.debug(
         "[Processing] Hitting url for getting document content : {}",
@@ -460,7 +461,7 @@ public class ConfluenceClient {
    */
   public Page getPage(String pageId) {
     String url = String
-        .format("%s://%s:%s/%s/%s/%s?%s",
+        .format(Locale.ROOT, "%s://%s:%s/%s/%s/%s?%s",
             protocol, host, port, path, CONTENT_PATH, pageId, EXPANDABLE_PARAMETERS);
     url = sanitizeUrl(url);
     logger.debug(
@@ -496,7 +497,7 @@ public class ConfluenceClient {
     boolean isLast = false;
     do {
       String url = String
-          .format("%s://%s:%s/%s/%s/%s/%s?start=%s&limit=%s",
+          .format(Locale.ROOT, "%s://%s:%s/%s/%s/%s/%s?start=%s&limit=%s",
               protocol, host, port, path, CONTENT_PATH, pageId, LABEL_PATH, lastStart, limit);
       url = sanitizeUrl(url);
       logger.debug(
@@ -545,7 +546,7 @@ public class ConfluenceClient {
       httpPost.addHeader(
           "Authorization",
           "Basic "
-              + Base64.encodeBase64String(String.format("%s:%s",
+              + Base64.encodeBase64String(String.format(Locale.ROOT, "%s:%s",
                   this.username, this.password).getBytes(
                   Charset.forName("UTF-8"))));
     }
@@ -650,7 +651,7 @@ public class ConfluenceClient {
   }
   
   private Spaces getSpaces() throws Exception {
-    String url = String.format("%s://%s:%s%s%sgetSpaces", protocol, host,
+    String url = String.format(Locale.ROOT, "%s://%s:%s%s%sgetSpaces", protocol, host,
         port, path, AUTHORITY_PATH);
 
     logger.debug(
@@ -672,7 +673,7 @@ public class ConfluenceClient {
   }
   
   private List<String> getSpacePermissionsForUser(Space space, String username) throws Exception {
-    String url = String.format("%s://%s:%s%s%sgetPermissionsForUser", protocol, host,
+    String url = String.format(Locale.ROOT, "%s://%s:%s%s%sgetPermissionsForUser", protocol, host,
         port, path, AUTHORITY_PATH);
 
     logger.debug(

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Page.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Page.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Page.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Page.java Fri Aug 12 22:20:00 2016
@@ -340,7 +340,7 @@ public class Page extends ConfluenceReso
           JSONObject view = (JSONObject) body.optJSONObject(KEY_VIEW);
           if (view != null) {
             page.content = view.optString(KEY_VALUE, null);
-            page.length = page.content.getBytes().length;
+            page.length = page.content.getBytes(StandardCharsets.UTF_8).length;
           }
         }
 

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/PageType.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/PageType.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/PageType.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/PageType.java Fri Aug 12 22:20:00 2016
@@ -19,6 +19,8 @@ package org.apache.manifoldcf.crawler.co
 
 import org.apache.commons.lang.WordUtils;
 
+import java.util.Locale;
+
 /**
  * <p>PageType class</p>
  * <p>Represents the kind of pages we can have in Confluence</p>
@@ -41,6 +43,6 @@ public enum PageType {
   }
   
   public String toString() {
-    return WordUtils.capitalize(name().toLowerCase());
+    return WordUtils.capitalize(name().toLowerCase(Locale.ROOT));
   }
 }

Modified: manifoldcf/trunk/connectors/confluence/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/confluence/tests/ConfluenceConnectorTest.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/confluence/tests/ConfluenceConnectorTest.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/confluence/tests/ConfluenceConnectorTest.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/confluence/tests/ConfluenceConnectorTest.java Fri Aug 12 22:20:00 2016
@@ -28,12 +28,7 @@ import static org.mockito.Mockito.when;
 
 import java.nio.charset.StandardCharsets;
 import java.text.DateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import org.apache.manifoldcf.agents.interfaces.RepositoryDocument;
 import org.apache.manifoldcf.core.interfaces.Specification;
@@ -112,7 +107,7 @@ public class ConfluenceConnectorTest {
 		Page fakePage = mock(Page.class);
 		
 		Date date = new Date();
-		DateFormat df = DateFormat.getDateTimeInstance();
+		DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.ROOT);
 		String content = "A";
 		String uri = "http://test";
 		byte[] documentBytes = content
@@ -173,7 +168,7 @@ public class ConfluenceConnectorTest {
 		Page fakePage = mock(Page.class);
 		when(fakePage.hasContent()).thenReturn(true);
 		Date date = new Date();
-		DateFormat df = DateFormat.getDateTimeInstance();
+		DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.ROOT);
 		String version = df.format(date);
 		when(fakePage.getLastModifiedDate()).thenReturn(df.parse(version));
 		

Modified: manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java (original)
+++ manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java Fri Aug 12 22:20:00 2016
@@ -234,13 +234,13 @@ public class DocumentFilter extends org.
     paramMap.put("MIMETYPES",allowedMimeTypes);
     paramMap.put("EXTENSIONS",allowedFileExtensions);
     
-    Calendar c = new GregorianCalendar();
+    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
     c.setTimeInMillis((minDate==null)?0L:minDate.longValue());
     paramMap.put("MINDATEYEAR",Integer.toString(c.get(Calendar.YEAR)));
     paramMap.put("MINDATEMONTH",Integer.toString(c.get(Calendar.MONTH)));
     paramMap.put("MINDATEDAY",Integer.toString(c.get(Calendar.DAY_OF_MONTH)));
     paramMap.put("MINDATEHOUR",Integer.toString(c.get(Calendar.HOUR_OF_DAY)));
-    paramMap.put("MINDATEMINUTE",String.format("%02d",c.get(Calendar.MINUTE)));
+    paramMap.put("MINDATEMINUTE",String.format(Locale.ROOT, "%02d",c.get(Calendar.MINUTE)));
   }
   
   /** Obtain the name of the form check javascript method to call.
@@ -339,7 +339,7 @@ public class DocumentFilter extends org.
     String minDateMinute = variableContext.getParameter(seqPrefix + "mindateminute");
     if (minDateYear != null && minDateMonth != null && minDateDay != null && minDateHour != null && minDateMinute != null)
     {
-      Calendar c = new GregorianCalendar();
+      Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
       try
       {
         c.set(Integer.parseInt(minDateYear),Integer.parseInt(minDateMonth),Integer.parseInt(minDateDay),Integer.parseInt(minDateHour),Integer.parseInt(minDateMinute));

Modified: manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/DCTM/AuthorityConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/DCTM/AuthorityConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/DCTM/AuthorityConnector.java (original)
+++ manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/DCTM/AuthorityConnector.java Fri Aug 12 22:20:00 2016
@@ -845,7 +845,7 @@ public class AuthorityConnector extends
       sb.append(field);
     sb.append("=");
     if (insensitive)
-      sb.append(quoteDQLString(value.toUpperCase()));
+      sb.append(quoteDQLString(value.toUpperCase(Locale.ROOT)));
     else
       sb.append(quoteDQLString(value));
     return sb.toString();

Modified: manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/MatchMap.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/MatchMap.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/MatchMap.java (original)
+++ manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/MatchMap.java Fri Aug 12 22:20:00 2016
@@ -359,11 +359,11 @@ public class MatchMap
                 int groupnum = Integer.parseInt(number);
                 String groupValue = m.group(groupnum);
                 if (upper)
-                  outputBuffer.append(groupValue.toUpperCase());
+                  outputBuffer.append(groupValue.toUpperCase(Locale.ROOT));
                 else if (lower)
-                  outputBuffer.append(groupValue.toLowerCase());
+                  outputBuffer.append(groupValue.toLowerCase(Locale.ROOT));
                 else if (mixed && groupValue.length() > 0)
-                  outputBuffer.append(groupValue.substring(0,1).toUpperCase()).append(groupValue.substring(1).toLowerCase());
+                  outputBuffer.append(groupValue.substring(0,1).toUpperCase(Locale.ROOT)).append(groupValue.substring(1).toLowerCase(Locale.ROOT));
                 else
                   outputBuffer.append(groupValue);
 

Modified: manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java (original)
+++ manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java Fri Aug 12 22:20:00 2016
@@ -22,6 +22,8 @@ package org.apache.manifoldcf.agents.out
 import org.apache.manifoldcf.core.interfaces.ConfigParams;
 import org.apache.manifoldcf.core.interfaces.IPostParameters;
 
+import java.util.Locale;
+
 public class ElasticSearchConfig extends ElasticSearchParam
 {
 
@@ -78,7 +80,7 @@ public class ElasticSearchConfig extends
   {
     for (ParameterEnum param : CONFIGURATIONLIST)
     {
-      String p = variableContext.getParameter(param.name().toLowerCase());
+      String p = variableContext.getParameter(param.name().toLowerCase(Locale.ROOT));
       if (p != null)
         parameters.setParameter(param.name(), p);
     }
@@ -86,7 +88,7 @@ public class ElasticSearchConfig extends
     String useMapperAttachmentsPresent = variableContext.getParameter("usemapperattachments_present");
     if (useMapperAttachmentsPresent != null)
     {
-      String useMapperAttachments = variableContext.getParameter(ParameterEnum.USEMAPPERATTACHMENTS.name().toLowerCase());
+      String useMapperAttachments = variableContext.getParameter(ParameterEnum.USEMAPPERATTACHMENTS.name().toLowerCase(Locale.ROOT));
       if (useMapperAttachments == null || useMapperAttachments.length() == 0)
         useMapperAttachments = "false";
       parameters.setParameter(ParameterEnum.USEMAPPERATTACHMENTS.name(), useMapperAttachments);

Modified: manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java (original)
+++ manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java Fri Aug 12 22:20:00 2016
@@ -30,6 +30,7 @@ import java.nio.charset.StandardCharsets
 import java.util.Iterator;
 
 import java.text.SimpleDateFormat;
+import java.util.Locale;
 import java.util.TimeZone;
 import java.util.Date;
 
@@ -288,7 +289,7 @@ public class ElasticSearchIndex extends
   {
     String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
     TimeZone UTC = TimeZone.getTimeZone("UTC");
-    DATE_FORMATTER = new SimpleDateFormat(ISO_FORMAT);
+    DATE_FORMATTER = new SimpleDateFormat(ISO_FORMAT, Locale.ROOT);
     DATE_FORMATTER.setTimeZone(UTC);
   }
   
@@ -364,7 +365,7 @@ public class ElasticSearchIndex extends
         sb.append('\\').append('f');
       else if (x < 32)
       {
-        sb.append("\\u").append(String.format("%04x", (int)x));
+        sb.append("\\u").append(String.format(Locale.ROOT, "%04x", (int)x));
       }
       else
       {

Modified: manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java (original)
+++ manifoldcf/trunk/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java Fri Aug 12 22:20:00 2016
@@ -339,7 +339,7 @@ public class EmailConnector extends org.
     Iterator<Map.Entry<String,String>> it = findMap.entrySet().iterator();
     while (it.hasNext()) {
       Map.Entry<String,String> pair = it.next();
-      findParameterName = pair.getKey().toLowerCase();
+      findParameterName = pair.getKey().toLowerCase(Locale.ROOT);
       findParameterValue = pair.getValue();
       if (Logging.connectors.isDebugEnabled())
         Logging.connectors.debug("Email: Finding emails where '" + findParameterName +
@@ -563,7 +563,7 @@ public class EmailConnector extends org.
             
             String subject = StringUtils.EMPTY;
             for (String metadata : requiredMetadata) {
-              if (metadata.toLowerCase().equals(EmailConfig.EMAIL_TO)) {
+              if (metadata.toLowerCase(Locale.ROOT).equals(EmailConfig.EMAIL_TO)) {
                 Address[] to = msg.getRecipients(Message.RecipientType.TO);
                 String[] toStr = new String[to.length];
                 int j = 0;
@@ -571,7 +571,7 @@ public class EmailConnector extends org.
                   toStr[j] = address.toString();
                 }
                 rd.addField(EmailConfig.EMAIL_TO, toStr);
-              } else if (metadata.toLowerCase().equals(EmailConfig.EMAIL_FROM)) {
+              } else if (metadata.toLowerCase(Locale.ROOT).equals(EmailConfig.EMAIL_FROM)) {
                 Address[] from = msg.getFrom();
                 String[] fromStr = new String[from.length];
                 int j = 0;
@@ -580,10 +580,10 @@ public class EmailConnector extends org.
                 }
                 rd.addField(EmailConfig.EMAIL_FROM, fromStr);
 
-              } else if (metadata.toLowerCase().equals(EmailConfig.EMAIL_SUBJECT)) {
+              } else if (metadata.toLowerCase(Locale.ROOT).equals(EmailConfig.EMAIL_SUBJECT)) {
                 subject = msg.getSubject();
                 rd.addField(EmailConfig.EMAIL_SUBJECT, subject);
-              } else if (metadata.toLowerCase().equals(EmailConfig.EMAIL_BODY)) {
+              } else if (metadata.toLowerCase(Locale.ROOT).equals(EmailConfig.EMAIL_BODY)) {
                 Object o = msg.getContent();
                 if (o instanceof Multipart) {
                   Multipart mp = (Multipart) msg.getContent();
@@ -602,9 +602,9 @@ public class EmailConnector extends org.
                 } else if (o instanceof String) {
                   rd.addField(EmailConfig.EMAIL_BODY, (String)o);
                 }
-              } else if (metadata.toLowerCase().equals(EmailConfig.EMAIL_DATE)) {
+              } else if (metadata.toLowerCase(Locale.ROOT).equals(EmailConfig.EMAIL_DATE)) {
                 rd.addField(EmailConfig.EMAIL_DATE, sentDate.toString());
-              } else if (metadata.toLowerCase().equals(EmailConfig.EMAIL_ATTACHMENT_ENCODING)) {
+              } else if (metadata.toLowerCase(Locale.ROOT).equals(EmailConfig.EMAIL_ATTACHMENT_ENCODING)) {
                 Multipart mp = (Multipart) msg.getContent();
                 if (mp != null) {
                   String[] encoding = new String[mp.getCount()];
@@ -620,7 +620,7 @@ public class EmailConnector extends org.
                   }
                   rd.addField(EmailConfig.ENCODING_FIELD, encoding);
                 }
-              } else if (metadata.toLowerCase().equals(EmailConfig.EMAIL_ATTACHMENT_MIMETYPE)) {
+              } else if (metadata.toLowerCase(Locale.ROOT).equals(EmailConfig.EMAIL_ATTACHMENT_MIMETYPE)) {
                 Multipart mp = (Multipart) msg.getContent();
                 String[] MIMEType = new String[mp.getCount()];
                 for (int k = 0, n = mp.getCount(); k < n; k++) {

Modified: manifoldcf/trunk/connectors/filenet/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filenet/FilenetConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/filenet/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filenet/FilenetConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/filenet/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filenet/FilenetConnector.java (original)
+++ manifoldcf/trunk/connectors/filenet/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filenet/FilenetConnector.java Fri Aug 12 22:20:00 2016
@@ -756,7 +756,7 @@ public class FilenetConnector extends or
     StringBuilder sqlBuffer = new StringBuilder(" WHERE ([IsCurrentVersion] = TRUE AND (");
     sqlBuffer.append(mimeTypesClause);
     sqlBuffer.append(")");
-    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
+    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("GMT"), Locale.ROOT);
 
     // FileNet can apparently take a while to make documents available for searching, so throw in a bias of 15 minutes
     long biasTime = 15L * 60000L;

Modified: manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConfig.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConfig.java (original)
+++ manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConfig.java Fri Aug 12 22:20:00 2016
@@ -22,6 +22,8 @@ package org.apache.manifoldcf.agents.out
 import org.apache.manifoldcf.core.interfaces.ConfigParams;
 import org.apache.manifoldcf.core.interfaces.IPostParameters;
 
+import java.util.Locale;
+
 
 public class FileOutputConfig extends FileOutputParam {
 
@@ -37,7 +39,6 @@ public class FileOutputConfig extends Fi
    * value returned by ConfigParams.getParameter is null, the default value is
    * set.
    * 
-   * @param paramList
    * @param params
    */
   public FileOutputConfig(ConfigParams params)
@@ -58,7 +59,7 @@ public class FileOutputConfig extends Fi
    */
   public final static void contextToConfig(IPostParameters variableContext, ConfigParams parameters) {
     for (ParameterEnum param : CONFIGURATIONLIST) {
-      String p = variableContext.getParameter(param.name().toLowerCase());
+      String p = variableContext.getParameter(param.name().toLowerCase(Locale.ROOT));
       if (p != null) {
         parameters.setParameter(param.name(), p);
       }

Modified: manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConnector.java (original)
+++ manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConnector.java Fri Aug 12 22:20:00 2016
@@ -816,7 +816,7 @@ public class FileOutputConnector extends
      */
     public static void contextToSpecNode(IPostParameters variableContext, ConfigurationNode specNode, int sequenceNumber) {
       for (ParameterEnum param : SPECIFICATIONLIST) {
-        String p = variableContext.getParameter("s"+sequenceNumber+"_"+param.name().toLowerCase());
+        String p = variableContext.getParameter("s"+sequenceNumber+"_"+param.name().toLowerCase(Locale.ROOT));
         if (p != null) {
           specNode.setAttribute(param.name(), p);
         }

Modified: manifoldcf/trunk/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java (original)
+++ manifoldcf/trunk/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java Fri Aug 12 22:20:00 2016
@@ -203,7 +203,7 @@ public class GenericConnector extends Ba
     }
 
     HttpClient client = getClient();
-    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
+    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ROOT);
 
     StringBuilder url = new StringBuilder(genericEntryPoint);
     url.append("?").append(ACTION_PARAM_NAME).append("=").append(ACTION_SEED);
@@ -1031,13 +1031,13 @@ public class GenericConnector extends Ba
     public PreemptiveAuth(Credentials creds) {
       this.credentials = creds;
     }
-
-    @Override
-    public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException {
-      request.addHeader(new BasicScheme(StandardCharsets.US_ASCII).authenticate(credentials, request, context));
-    }
-  }
-
+
+    @Override
+    public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException {
+      request.addHeader(new BasicScheme(StandardCharsets.US_ASCII).authenticate(credentials, request, context));
+    }
+  }
+
   protected static class CheckThread extends Thread {
 
     protected HttpClient client;

Modified: manifoldcf/trunk/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/api/BooleanAdapter.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/api/BooleanAdapter.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/api/BooleanAdapter.java (original)
+++ manifoldcf/trunk/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/api/BooleanAdapter.java Fri Aug 12 22:20:00 2016
@@ -16,12 +16,13 @@
 package org.apache.manifoldcf.crawler.connectors.generic.api;
 
 import javax.xml.bind.annotation.adapters.XmlAdapter;
+import java.util.Locale;
 
 public class BooleanAdapter extends XmlAdapter<String, Boolean> {
 
   @Override
   public Boolean unmarshal(String v) throws Exception {
-    v = v.toLowerCase();
+    v = v.toLowerCase(Locale.ROOT);
     return "true".equals(v) || "1".equals(v) || "on".equals(v) || "y".equals(v);
   }
 

Modified: manifoldcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/GTSConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/GTSConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/GTSConnector.java (original)
+++ manifoldcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/GTSConnector.java Fri Aug 12 22:20:00 2016
@@ -971,7 +971,7 @@ public class GTSConnector extends org.ap
   */
   protected static int recognizeApp(String appName)
   {
-    appName = appName.toUpperCase();
+    appName = appName.toUpperCase(Locale.ROOT);
     if (appName.indexOf("MICROSOFT WORD") != -1)
       return DT_MSWORD;
     if (appName.indexOf("MICROSOFT OFFICE WORD") != -1)

Modified: manifoldcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/HttpPoster.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/HttpPoster.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/HttpPoster.java (original)
+++ manifoldcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/HttpPoster.java Fri Aug 12 22:20:00 2016
@@ -1034,7 +1034,7 @@ public class HttpPoster
           // Basically, we have no choice but to interpret that in the same manner as a 400, since no matter how we do it, it's a race and the 'broken pipe'
           // result is always possible.  So we might as well expect it and treat it properly.
           //
-          if (ioe.getClass().getName().equals("java.net.SocketException") && ioe.getMessage().toLowerCase().indexOf("broken pipe") != -1)
+          if (ioe.getClass().getName().equals("java.net.SocketException") && ioe.getMessage().toLowerCase(Locale.ROOT).indexOf("broken pipe") != -1)
           {
             // We've seen what looks like the ingestion interface forcibly closing the socket.
             // We *choose* to interpret this just like a 400 response.  However, we log in the history using a different code,

Modified: manifoldcf/trunk/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConfig.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConfig.java (original)
+++ manifoldcf/trunk/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConfig.java Fri Aug 12 22:20:00 2016
@@ -22,6 +22,8 @@ package org.apache.manifoldcf.agents.out
 import org.apache.manifoldcf.core.interfaces.ConfigParams;
 import org.apache.manifoldcf.core.interfaces.IPostParameters;
 
+import java.util.Locale;
+
 
 public class HDFSOutputConfig extends HDFSOutputParam {
 
@@ -42,7 +44,6 @@ public class HDFSOutputConfig extends HD
    * value returned by ConfigParams.getParameter is null, the default value is
    * set.
    * 
-   * @param paramList
    * @param params
    */
   public HDFSOutputConfig(ConfigParams params)
@@ -63,7 +64,7 @@ public class HDFSOutputConfig extends HD
    */
   public final static void contextToConfig(IPostParameters variableContext, ConfigParams parameters) {
     for (ParameterEnum param : CONFIGURATIONLIST) {
-      String p = variableContext.getParameter(param.name().toLowerCase());
+      String p = variableContext.getParameter(param.name().toLowerCase(Locale.ROOT));
       if (p != null) {
         parameters.setParameter(param.name(), p);
       }

Modified: manifoldcf/trunk/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConnector.java (original)
+++ manifoldcf/trunk/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConnector.java Fri Aug 12 22:20:00 2016
@@ -914,7 +914,7 @@ public class HDFSOutputConnector extends
       */
     public static void contextToSpecNode(IPostParameters variableContext, ConfigurationNode specNode, int sequenceNumber) {
       for (ParameterEnum param : SPECIFICATIONLIST) {
-        String p = variableContext.getParameter("s"+sequenceNumber+"_"+param.name().toLowerCase());
+        String p = variableContext.getParameter("s"+sequenceNumber+"_"+param.name().toLowerCase(Locale.ROOT));
         if (p != null) {
           specNode.setAttribute(param.name(), p);
         }
@@ -925,7 +925,7 @@ public class HDFSOutputConnector extends
     public String toVersionString() {
       StringBuilder sb = new StringBuilder();
       pack(sb,rootPath,'+');
-      return sb.toString();
+      return sb.toString();
     }
 
     /**

Modified: manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/MatchMap.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/MatchMap.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/MatchMap.java (original)
+++ manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/MatchMap.java Fri Aug 12 22:20:00 2016
@@ -359,11 +359,11 @@ public class MatchMap
                 int groupnum = Integer.parseInt(number);
                 String groupValue = m.group(groupnum);
                 if (upper)
-                  outputBuffer.append(groupValue.toUpperCase());
+                  outputBuffer.append(groupValue.toUpperCase(Locale.ROOT));
                 else if (lower)
-                  outputBuffer.append(groupValue.toLowerCase());
+                  outputBuffer.append(groupValue.toLowerCase(Locale.ROOT));
                 else if (mixed && groupValue.length() > 0)
-                  outputBuffer.append(groupValue.substring(0,1).toUpperCase()).append(groupValue.substring(1).toLowerCase());
+                  outputBuffer.append(groupValue.substring(0,1).toUpperCase(Locale.ROOT)).append(groupValue.substring(1).toLowerCase(Locale.ROOT));
                 else
                   outputBuffer.append(groupValue);
 

Modified: manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java (original)
+++ manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java Fri Aug 12 22:20:00 2016
@@ -309,7 +309,7 @@ public class SharedDriveConnector extend
             x == '$' || x == ',')
           {
             output.append('%');
-            String hexValue = Integer.toHexString((int)x).toUpperCase();
+            String hexValue = Integer.toHexString((int)x).toUpperCase(Locale.ROOT);
             if (hexValue.length() == 1)
               output.append('0');
             output.append(hexValue);

Modified: manifoldcf/trunk/connectors/kafka/connector/src/main/java/org/apache/manifoldcf/agents/output/kafka/KafkaMessage.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/kafka/connector/src/main/java/org/apache/manifoldcf/agents/output/kafka/KafkaMessage.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/kafka/connector/src/main/java/org/apache/manifoldcf/agents/output/kafka/KafkaMessage.java (original)
+++ manifoldcf/trunk/connectors/kafka/connector/src/main/java/org/apache/manifoldcf/agents/output/kafka/KafkaMessage.java Fri Aug 12 22:20:00 2016
@@ -94,7 +94,7 @@ public class KafkaMessage {
       pw.print("}");
       pw.flush();
       IOUtils.closeQuietly(pw);
-      finalString = new String(((ByteArrayOutputStream) out).toByteArray());
+      finalString = new String(((ByteArrayOutputStream) out).toByteArray(), StandardCharsets.UTF_8);
       //System.out.println("FINAL: " + finalString);
     } catch (Exception e) {
       e.printStackTrace();

Modified: manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java (original)
+++ manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java Fri Aug 12 22:20:00 2016
@@ -5669,7 +5669,7 @@ public class LivelinkConnector extends o
             int index = includeMatch.lastIndexOf(".");
             if (index != -1)
             {
-              String type = includeMatch.substring(index+1).toLowerCase().replace('*','%');
+              String type = includeMatch.substring(index+1).toLowerCase(Locale.ROOT).replace('*','%');
               if (first)
                 first = false;
               else

Modified: manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/MatchMap.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/MatchMap.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/MatchMap.java (original)
+++ manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/MatchMap.java Fri Aug 12 22:20:00 2016
@@ -359,11 +359,11 @@ public class MatchMap
                 int groupnum = Integer.parseInt(number);
                 String groupValue = m.group(groupnum);
                 if (upper)
-                  outputBuffer.append(groupValue.toUpperCase());
+                  outputBuffer.append(groupValue.toUpperCase(Locale.ROOT));
                 else if (lower)
-                  outputBuffer.append(groupValue.toLowerCase());
+                  outputBuffer.append(groupValue.toLowerCase(Locale.ROOT));
                 else if (mixed && groupValue.length() > 0)
-                  outputBuffer.append(groupValue.substring(0,1).toUpperCase()).append(groupValue.substring(1).toLowerCase());
+                  outputBuffer.append(groupValue.substring(0,1).toUpperCase(Locale.ROOT)).append(groupValue.substring(1).toLowerCase(Locale.ROOT));
                 else
                   outputBuffer.append(groupValue);
 

Modified: manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MatchMap.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MatchMap.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MatchMap.java (original)
+++ manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MatchMap.java Fri Aug 12 22:20:00 2016
@@ -348,11 +348,11 @@ public class MatchMap
                 int groupnum = Integer.parseInt(number);
                 String groupValue = m.group(groupnum);
                 if (upper)
-                  outputBuffer.append(groupValue.toUpperCase());
+                  outputBuffer.append(groupValue.toUpperCase(Locale.ROOT));
                 else if (lower)
-                  outputBuffer.append(groupValue.toLowerCase());
+                  outputBuffer.append(groupValue.toLowerCase(Locale.ROOT));
                 else if (mixed && groupValue.length() > 0)
-                  outputBuffer.append(groupValue.substring(0,1).toUpperCase()).append(groupValue.substring(1).toLowerCase());
+                  outputBuffer.append(groupValue.substring(0,1).toUpperCase(Locale.ROOT)).append(groupValue.substring(1).toLowerCase(Locale.ROOT));
                 else
                   outputBuffer.append(groupValue);
 

Modified: manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConfig.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConfig.java (original)
+++ manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConfig.java Fri Aug 12 22:20:00 2016
@@ -20,6 +20,8 @@ package org.apache.manifoldcf.agents.out
 import org.apache.manifoldcf.core.interfaces.ConfigParams;
 import org.apache.manifoldcf.core.interfaces.IPostParameters;
 
+import java.util.Locale;
+
 public class OpenSearchServerConfig extends OpenSearchServerParam {
 
   /**
@@ -68,7 +70,7 @@ public class OpenSearchServerConfig exte
   public final static void contextToConfig(IPostParameters variableContext,
       ConfigParams parameters) {
     for (ParameterEnum param : CONFIGURATIONLIST) {
-      String p = variableContext.getParameter(param.name().toLowerCase());
+      String p = variableContext.getParameter(param.name().toLowerCase(Locale.ROOT));
       if (p != null)
         parameters.setParameter(param.name(), p);
     }

Modified: manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerIndex.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerIndex.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerIndex.java (original)
+++ manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerIndex.java Fri Aug 12 22:20:00 2016
@@ -17,10 +17,8 @@
 
 package org.apache.manifoldcf.agents.output.opensearchserver;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PrintWriter;
+import java.io.*;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -166,7 +164,7 @@ public class OpenSearchServerIndex exten
     public void writeTo(OutputStream out)
         throws IOException
     {
-      PrintWriter pw = new PrintWriter(out);
+      PrintWriter pw = new PrintWriter(new OutputStreamWriter(out, StandardCharsets.UTF_8), false);
       try
       {
         pw.println("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");

Modified: manifoldcf/trunk/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/MatchMap.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/MatchMap.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/MatchMap.java (original)
+++ manifoldcf/trunk/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/MatchMap.java Fri Aug 12 22:20:00 2016
@@ -359,11 +359,11 @@ public class MatchMap
                 int groupnum = Integer.parseInt(number);
                 String groupValue = m.group(groupnum);
                 if (upper)
-                  outputBuffer.append(groupValue.toUpperCase());
+                  outputBuffer.append(groupValue.toUpperCase(Locale.ROOT));
                 else if (lower)
-                  outputBuffer.append(groupValue.toLowerCase());
+                  outputBuffer.append(groupValue.toLowerCase(Locale.ROOT));
                 else if (mixed && groupValue.length() > 0)
-                  outputBuffer.append(groupValue.substring(0,1).toUpperCase()).append(groupValue.substring(1).toLowerCase());
+                  outputBuffer.append(groupValue.substring(0,1).toUpperCase(Locale.ROOT)).append(groupValue.substring(1).toLowerCase(Locale.ROOT));
                 else
                   outputBuffer.append(groupValue);
 

Modified: manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java (original)
+++ manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java Fri Aug 12 22:20:00 2016
@@ -1337,7 +1337,7 @@ public class RSSConnector extends org.ap
                 {
                   String[] pubDateValuesISO = new String[pubDates.length];
                   TimeZone tz = TimeZone.getTimeZone("UTC");
-                  DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'");
+                  DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'", Locale.ROOT);
                   df.setTimeZone(tz);
                   for (int k = 0; k < pubDates.length; k++)
                   {
@@ -5521,16 +5521,16 @@ public class RSSConnector extends org.ap
             sb.append(groupValue);
             break;
           case EvaluatorToken.GROUPSTYLE_LOWER:
-            sb.append(groupValue.toLowerCase());
+            sb.append(groupValue.toLowerCase(Locale.ROOT));
             break;
           case EvaluatorToken.GROUPSTYLE_UPPER:
-            sb.append(groupValue.toUpperCase());
+            sb.append(groupValue.toUpperCase(Locale.ROOT));
             break;
           case EvaluatorToken.GROUPSTYLE_MIXED:
             if (groupValue.length() > 0)
             {
-              sb.append(groupValue.substring(0,1).toUpperCase());
-              sb.append(groupValue.substring(1).toLowerCase());
+              sb.append(groupValue.substring(0,1).toUpperCase(Locale.ROOT));
+              sb.append(groupValue.substring(1).toLowerCase(Locale.ROOT));
             }
             break;
           default:

Modified: manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Robots.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Robots.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Robots.java (original)
+++ manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Robots.java Fri Aug 12 22:20:00 2016
@@ -346,7 +346,7 @@ public class Robots
         // condition, or no records are present at all, access is unlimited."
 
         boolean sawAgent = false;
-        String userAgentUpper = userAgent.toUpperCase();
+        String userAgentUpper = userAgent.toUpperCase(Locale.ROOT);
 
         int i = 0;
         while (i < records.size())
@@ -544,7 +544,7 @@ public class Robots
           int numSignPos = x.indexOf("#");
           if (numSignPos != -1)
             x = x.substring(0,numSignPos);
-          String lowercaseLine = x.toLowerCase().trim();
+          String lowercaseLine = x.toLowerCase(Locale.ROOT).trim();
           if (lowercaseLine.startsWith("user-agent:"))
           {
             if (seenAction)
@@ -766,7 +766,7 @@ public class Robots
       int i = 0;
       while (i < userAgents.size())
       {
-        String agent = ((String)userAgents.get(i++)).toUpperCase();
+        String agent = ((String)userAgents.get(i++)).toUpperCase(Locale.ROOT);
         if (exactMatch && agent.trim().equals(agentNameUpper))
           return true;
         if (!exactMatch && agentNameUpper.indexOf(agent) != -1)




Mime
View raw message