Modified: 
manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoRepositoryConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoRepositoryConnector.java?rev=1837851&r1=1837850&r2=1837851&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoRepositoryConnector.java
 (original)
+++ 
manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoRepositoryConnector.java
 Sat Aug 11 09:41:00 2018
@@ -414,7 +414,7 @@ public class NuxeoRepositoryConnector ex
             List<String> domains = ns.getDomains();
             List<String> documentsType = ns.getDocumentsType();
 
-            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);
             sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
             Date currentDate =  new Date();
 
@@ -446,7 +446,7 @@ public class NuxeoRepositoryConnector ex
         String query = "";
 
         if (date == null || date.isEmpty()) {
-            SimpleDateFormat DATE_FORMAT = new 
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
+            SimpleDateFormat DATE_FORMAT = new 
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", Locale.ROOT);
             date = DATE_FORMAT.format(new Date(0));
         }
         query = "dc:modified > '" + date + "'";
@@ -454,28 +454,28 @@ public class NuxeoRepositoryConnector ex
         if (!domains.isEmpty()) {
             Iterator<String> itdom = domains.iterator();
 
-            query = String.format(" %s AND ( ecm:path STARTSWITH '/%s'", 
query, itdom.next());
+            query = String.format(Locale.ROOT, " %s AND ( ecm:path STARTSWITH 
'/%s'", query, itdom.next());
 
             while (itdom.hasNext()) {
-                query = String.format("%s OR ecm:path STARTSWITH '/%s'", 
query, itdom.next());
+                query = String.format(Locale.ROOT, "%s OR ecm:path STARTSWITH 
'/%s'", query, itdom.next());
             }
 
-            query = String.format("%s )", query);
+            query = String.format(Locale.ROOT, "%s )", query);
         }
 
         if (!documentsType.isEmpty()) {
             Iterator<String> itDocTy = documentsType.iterator();
 
-            query = String.format(" %s AND ( ecm:primaryType = '%s'", query, 
itDocTy.next());
+            query = String.format(Locale.ROOT, " %s AND ( ecm:primaryType = 
'%s'", query, itDocTy.next());
 
             while (itDocTy.hasNext()) {
-                query = String.format("%s OR ecm:primaryType = '%s'", query, 
itDocTy.next());
+                query = String.format(Locale.ROOT, "%s OR ecm:primaryType = 
'%s'", query, itDocTy.next());
             }
 
-            query = String.format("%s )", query);
+            query = String.format(Locale.ROOT, "%s )", query);
         }
 
-        query = String.format(URI_DOCUMENT + " where ecm:mixinType != 
'HiddenInNavigation' AND ecm:isProxy = 0 " +
+        query = String.format(Locale.ROOT, URI_DOCUMENT + " where 
ecm:mixinType != 'HiddenInNavigation' AND ecm:isProxy = 0 " +
                 "AND ecm:isCheckedInVersion = 0 AND %s ", query);
 
         Documents docs = nuxeoClient.repository().query(query, 
String.valueOf(limit), String.valueOf(start), null, null,
@@ -515,7 +515,7 @@ public class NuxeoRepositoryConnector ex
                 pResult = processDocument(document, documentId, spec, version, 
indexed_version,
                         activities, Maps.newHashMap());
             } catch (NuxeoClientException exception) {
-                logger.info(String.format("Error Fetching Nuxeo Document %s. 
Marking for deletion", documentId));
+                logger.info(String.format(Locale.ROOT, "Error Fetching Nuxeo 
Document %s. Marking for deletion", documentId));
                 activities.deleteDocument(documentId);
             } catch (IOException exception) {
                 long interruptionRetryTime = 5L * 60L * 1000L;
@@ -544,7 +544,7 @@ public class NuxeoRepositoryConnector ex
         Date lastModifiedDate = null;
 
         if (lastModified != null) {
-            DateFormat formatter = new 
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
+            DateFormat formatter = new 
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", Locale.ROOT);
             try {
                 lastModifiedDate = formatter.parse(lastModified);
             } catch (Exception ex) {
@@ -699,10 +699,10 @@ public class NuxeoRepositoryConnector ex
 
         NuxeoSpecification ns = NuxeoSpecification.from(spec);
 
-        paramMap.put(NuxeoConfiguration.Specification.DOMAINS.toUpperCase(), 
ns.getDomains());
-        
paramMap.put(NuxeoConfiguration.Specification.DOCUMENTS_TYPE.toUpperCase(), 
ns.documentsType);
-        
paramMap.put(NuxeoConfiguration.Specification.PROCESS_TAGS.toUpperCase(), 
ns.isProcessTags().toString());
-        
paramMap.put(NuxeoConfiguration.Specification.PROCESS_ATTACHMENTS.toUpperCase(),
+        
paramMap.put(NuxeoConfiguration.Specification.DOMAINS.toUpperCase(Locale.ROOT), 
ns.getDomains());
+        
paramMap.put(NuxeoConfiguration.Specification.DOCUMENTS_TYPE.toUpperCase(Locale.ROOT),
 ns.documentsType);
+        
paramMap.put(NuxeoConfiguration.Specification.PROCESS_TAGS.toUpperCase(Locale.ROOT),
 ns.isProcessTags().toString());
+        
paramMap.put(NuxeoConfiguration.Specification.PROCESS_ATTACHMENTS.toUpperCase(Locale.ROOT),
                 ns.isProcessAttachments().toString());
 
         Messages.outputResourceWithVelocity(out, locale, VIEW_SPEC_FORWARD, 
paramMap);
@@ -835,10 +835,10 @@ public class NuxeoRepositoryConnector ex
 
         NuxeoSpecification ns = NuxeoSpecification.from(spec);
 
-        paramMap.put(NuxeoConfiguration.Specification.DOMAINS.toUpperCase(), 
ns.getDomains());
-        
paramMap.put(NuxeoConfiguration.Specification.DOCUMENTS_TYPE.toUpperCase(), 
ns.getDocumentsType());
-        
paramMap.put(NuxeoConfiguration.Specification.PROCESS_TAGS.toUpperCase(), 
ns.isProcessTags());
-        
paramMap.put(NuxeoConfiguration.Specification.PROCESS_ATTACHMENTS.toUpperCase(),
 ns.isProcessAttachments());
+        
paramMap.put(NuxeoConfiguration.Specification.DOMAINS.toUpperCase(Locale.ROOT), 
ns.getDomains());
+        
paramMap.put(NuxeoConfiguration.Specification.DOCUMENTS_TYPE.toUpperCase(Locale.ROOT),
 ns.getDocumentsType());
+        
paramMap.put(NuxeoConfiguration.Specification.PROCESS_TAGS.toUpperCase(Locale.ROOT),
 ns.isProcessTags());
+        
paramMap.put(NuxeoConfiguration.Specification.PROCESS_ATTACHMENTS.toUpperCase(Locale.ROOT),
 ns.isProcessAttachments());
 
         Messages.outputResourceWithVelocity(out, locale, 
EDIT_SPEC_FORWARD_CONF_DOMAINS, paramMap);
         Messages.outputResourceWithVelocity(out, locale, 
EDIT_SPEC_FORWARD_CONF_DOCUMENTS_TYPE, paramMap);

Modified: 
manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/model/NuxeoDocumentHelper.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/model/NuxeoDocumentHelper.java?rev=1837851&r1=1837850&r2=1837851&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/model/NuxeoDocumentHelper.java
 (original)
+++ 
manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/model/NuxeoDocumentHelper.java
 Sat Aug 11 09:41:00 2018
@@ -60,7 +60,8 @@ public class NuxeoDocumentHelper {
     private static final Set<String> NUXEO_FOLDER_TYPE = 
ImmutableSet.of("Folderish", "Collection");
     private static final String NUXEO_TAGS_PROPERTY = "nxtag:tags";
 
-
+    private final static byte[] EMPTY_BYTES = new byte[0];
+    
     // Constructor
     public NuxeoDocumentHelper(Document document) {
         this.document = document;
@@ -123,7 +124,7 @@ public class NuxeoDocumentHelper {
             this.size = blob.getLength();
             this.filename = blob.getFilename();
         } catch (Exception ex) {
-            this.content = new ByteArrayInputStream("".getBytes());
+            this.content = new ByteArrayInputStream(EMPTY_BYTES);
             this.mimetype = DEFAULT_MIMETYPE;
             this.size = 0;
             this.filename = document.getTitle();
@@ -216,7 +217,7 @@ public class NuxeoDocumentHelper {
                 attach.data = blob.getStream();
 
             } catch (Exception ex) {
-                attach.data = new ByteArrayInputStream("".getBytes());
+                attach.data = new ByteArrayInputStream(EMPTY_BYTES);
             }
 
             attachments.add(attach);

Modified: 
manifoldcf/trunk/connectors/slack/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/slack/SlackSession.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/slack/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/slack/SlackSession.java?rev=1837851&r1=1837850&r2=1837851&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/slack/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/slack/SlackSession.java
 (original)
+++ 
manifoldcf/trunk/connectors/slack/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/slack/SlackSession.java
 Sat Aug 11 09:41:00 2018
@@ -152,10 +152,9 @@ public class SlackSession
     boolean isExpectedPayload = "invalid_payload".equals(responseBody);
     boolean isConnectionOk = isExpectedStatus && isExpectedPayload;
     if (!isConnectionOk) {
-      String messageTemplate = "connection failed: status {0}, payload {1}";
       String statusInfo = isExpectedStatus ? "ok" : statusCode + " is 
unexpected";
       String payloadInfo = isExpectedPayload ? "ok" : "is unexpected";
-      String message = MessageFormat.format(messageTemplate, statusInfo, 
payloadInfo);
+      String message = "connection failed: status "+statusInfo+", payload 
"+payloadInfo;
       throw new ClientProtocolException(message);
     }
   }

Modified: 
manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaParser.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaParser.java?rev=1837851&r1=1837850&r2=1837851&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaParser.java
 (original)
+++ 
manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaParser.java
 Sat Aug 11 09:41:00 2018
@@ -46,7 +46,7 @@ public class TikaParser {
     if (tikaConfig == null || tikaConfig.length() == 0) {
       parser = new AutoDetectParser();
     } else {
-      final InputStream is = new ByteArrayInputStream(tikaConfig.getBytes());
+      final InputStream is = new 
ByteArrayInputStream(tikaConfig.getBytes(java.nio.charset.StandardCharsets.UTF_8));
       try {
         final TikaConfig conf = new TikaConfig(is);
         parser = new AutoDetectParser(conf);

Modified: 
manifoldcf/trunk/connectors/tikaservice/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tikaservice/TikaExtractor.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tikaservice/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tikaservice/TikaExtractor.java?rev=1837851&r1=1837850&r2=1837851&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/tikaservice/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tikaservice/TikaExtractor.java
 (original)
+++ 
manifoldcf/trunk/connectors/tikaservice/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tikaservice/TikaExtractor.java
 Sat Aug 11 09:41:00 2018
@@ -617,7 +617,7 @@ public class TikaExtractor extends org.a
             if (response.getStatusLine().getStatusCode() == 200 || 
response.getStatusLine().getStatusCode() == 204) {
               tikaServerIs = response.getEntity().getContent();
               try {
-                final BufferedReader br = new BufferedReader(new 
InputStreamReader(tikaServerIs));
+                final BufferedReader br = new BufferedReader(new 
InputStreamReader(tikaServerIs, java.nio.charset.StandardCharsets.UTF_8));
                 final JSONParser parser = new JSONParser();
                 JSONObject metaJson;
                 final StringBuilder sb = new StringBuilder();


Reply via email to