manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1756230 [2/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
Modified: manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/SetSeedList.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/SetSeedList.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/SetSeedList.java (original)
+++ manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/SetSeedList.java Fri Aug 12 22:20:00 2016
@@ -22,6 +22,8 @@ import java.io.*;
 import org.apache.manifoldcf.core.interfaces.*;
 import org.apache.manifoldcf.crawler.interfaces.*;
 import org.apache.manifoldcf.crawler.system.*;
+
+import java.nio.charset.StandardCharsets;
 import java.util.*;
 
 /** This class is used to set the seed list for a specified RSS job.
@@ -66,7 +68,7 @@ public class SetSeedList
           i++;
       }
 
-      java.io.Reader str = new java.io.InputStreamReader(System.in);
+      java.io.Reader str = new java.io.InputStreamReader(System.in, StandardCharsets.UTF_8);
       try
       {
         java.io.BufferedReader is = new java.io.BufferedReader(str);

Modified: manifoldcf/trunk/connectors/rss/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/rss/tests/MockRSSService.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/rss/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/rss/tests/MockRSSService.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/rss/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/rss/tests/MockRSSService.java (original)
+++ manifoldcf/trunk/connectors/rss/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/rss/tests/MockRSSService.java Fri Aug 12 22:20:00 2016
@@ -99,38 +99,38 @@ public class MockRSSService
         if ((theFeed % 3) == 0)
         {
           res.setContentType("text/xml; charset=utf-8");
-          res.getWriter().printf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+          res.getWriter().printf(Locale.ROOT, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
         }
         else if ((theFeed % 3) ==1)
         {
           res.setContentType("text/xml");
           res.setCharacterEncoding("UTF-16BE");
           // Write BOM + preamble
-          res.getWriter().printf("\uFEFF<?xml version=\"1.0\" encoding=\"UTF-16BE\"?>\n");
+          res.getWriter().printf(Locale.ROOT, "\uFEFF<?xml version=\"1.0\" encoding=\"UTF-16BE\"?>\n");
         }
         else
         {
           res.setContentType("text/xml");
           res.setCharacterEncoding("UTF-16LE");
           // Write BOM + preamble
-          res.getWriter().printf("\uFEFF<?xml version=\"1.0\" encoding=\"UTF-16LE\"?>\n");
+          res.getWriter().printf(Locale.ROOT, "\uFEFF<?xml version=\"1.0\" encoding=\"UTF-16LE\"?>\n");
         }
         // Write out an rss 2.0 response, with docsperfeed docs
-        res.getWriter().printf("<rss>\n");
-        res.getWriter().printf("  <channel>\n");
+        res.getWriter().printf(Locale.ROOT, "<rss>\n");
+        res.getWriter().printf(Locale.ROOT, "  <channel>\n");
         for (int i = 0 ; i < docsPerFeed ; i++)
         {
-          res.getWriter().printf("    <item>\n");
+          res.getWriter().printf(Locale.ROOT, "    <item>\n");
           // Test CDATA feeds
           if ((i % 2) == 0)
-            res.getWriter().printf("      <link>http://localhost:8189/rss/gen.php?type=doc&#38;feed="+theFeed+"&#38;doc="+i+"</link>\n");
+            res.getWriter().printf(Locale.ROOT, "      <link>http://localhost:8189/rss/gen.php?type=doc&#38;feed="+theFeed+"&#38;doc="+i+"</link>\n");
           else
-            res.getWriter().printf("      <link><![CDATA[http://localhost:8189/rss/gen.php?type=doc&feed="+theFeed+"&doc="+i+"]]></link>\n");
-          res.getWriter().printf("      <title>Feed "+theFeed+" Document "+i+"</title>\n");
-          res.getWriter().printf("    </item>\n");
+            res.getWriter().printf(Locale.ROOT, "      <link><![CDATA[http://localhost:8189/rss/gen.php?type=doc&feed="+theFeed+"&doc="+i+"]]></link>\n");
+          res.getWriter().printf(Locale.ROOT, "      <title>Feed "+theFeed+" Document "+i+"</title>\n");
+          res.getWriter().printf(Locale.ROOT, "    </item>\n");
         }
-        res.getWriter().printf("  </channel>\n");
-        res.getWriter().printf("</rss>\n");
+        res.getWriter().printf(Locale.ROOT, "  </channel>\n");
+        res.getWriter().printf(Locale.ROOT, "</rss>\n");
         res.getWriter().flush();
       }
       else if (type != null && type.equals("doc"))
@@ -151,7 +151,7 @@ public class MockRSSService
         // Generate doc response
         res.setStatus(HttpServletResponse.SC_OK);
         res.setContentType("text/plain; charset=utf-8");
-        res.getWriter().printf("This is feed number "+theFeed+" and document number "+theDoc+"\n");
+        res.getWriter().printf(Locale.ROOT, "This is feed number "+theFeed+" and document number "+theDoc+"\n");
         res.getWriter().flush();
       }
       else

Modified: manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxClient.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxClient.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxClient.java (original)
+++ manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxClient.java Fri Aug 12 22:20:00 2016
@@ -18,6 +18,7 @@ package org.apache.manifoldcf.agents.out
 
 import java.io.IOException;
 import java.io.StringReader;
+import java.util.Locale;
 import java.util.UUID;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -170,7 +171,7 @@ public class SearchBloxClient {
   private ResponseCode post(SearchBloxDocument document, String format, SearchBloxDocument.DocumentAction action)
       throws SearchBloxException {
     
-    SearchBloxDocument.IndexingFormat iFormat = SearchBloxDocument.IndexingFormat.valueOf(format.toUpperCase());
+    SearchBloxDocument.IndexingFormat iFormat = SearchBloxDocument.IndexingFormat.valueOf(format.toUpperCase(Locale.ROOT));
       
     if (iFormat == null) {
       Logging.connectors.error("[Post request] Format not recognized " +format);

Modified: manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxConnector.java (original)
+++ manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxConnector.java Fri Aug 12 22:20:00 2016
@@ -606,29 +606,29 @@ public class SearchBloxConnector extends
         if (collection == null)
           collection = DEFAULT_COLLECTION;
         
-        paramMap.put(SearchBloxConfig.ATTRIBUTE_TITLEBOOST.toUpperCase(),
+        paramMap.put(SearchBloxConfig.ATTRIBUTE_TITLEBOOST.toUpperCase(Locale.ROOT),
             titleBoost);
-        paramMap.put(SearchBloxConfig.ATTRIBUTE_CONTENTBOOST.toUpperCase(),
+        paramMap.put(SearchBloxConfig.ATTRIBUTE_CONTENTBOOST.toUpperCase(Locale.ROOT),
             contentBoost);
-        paramMap.put(SearchBloxConfig.ATTRIBUTE_KEYWORDSBOOST.toUpperCase(),
+        paramMap.put(SearchBloxConfig.ATTRIBUTE_KEYWORDSBOOST.toUpperCase(Locale.ROOT),
             keywordsBoost);
-        paramMap.put(SearchBloxConfig.ATTRIBUTE_DESCRIPTIONBOOST.toUpperCase(),
+        paramMap.put(SearchBloxConfig.ATTRIBUTE_DESCRIPTIONBOOST.toUpperCase(Locale.ROOT),
             descriptionBoost);
         paramMap.put(SearchBloxConfig.ATTRIBUTE_COLLECTION_NAME
-            .toUpperCase(), collection);
+            .toUpperCase(Locale.ROOT), collection);
 
         return;
       }
 
     }
 
-    paramMap.put(SearchBloxConfig.ATTRIBUTE_TITLEBOOST.toUpperCase(), 0);
-    paramMap.put(SearchBloxConfig.ATTRIBUTE_CONTENTBOOST.toUpperCase(), 0);
-    paramMap.put(SearchBloxConfig.ATTRIBUTE_KEYWORDSBOOST.toUpperCase(), 0);
-    paramMap.put(SearchBloxConfig.ATTRIBUTE_DESCRIPTIONBOOST.toUpperCase(), 0);
-    paramMap.put(SearchBloxConfig.ATTRIBUTE_INDEX_FORMAT.toUpperCase(),
+    paramMap.put(SearchBloxConfig.ATTRIBUTE_TITLEBOOST.toUpperCase(Locale.ROOT), 0);
+    paramMap.put(SearchBloxConfig.ATTRIBUTE_CONTENTBOOST.toUpperCase(Locale.ROOT), 0);
+    paramMap.put(SearchBloxConfig.ATTRIBUTE_KEYWORDSBOOST.toUpperCase(Locale.ROOT), 0);
+    paramMap.put(SearchBloxConfig.ATTRIBUTE_DESCRIPTIONBOOST.toUpperCase(Locale.ROOT), 0);
+    paramMap.put(SearchBloxConfig.ATTRIBUTE_INDEX_FORMAT.toUpperCase(Locale.ROOT),
         IndexingFormat.XML.name());
-    paramMap.put(SearchBloxConfig.ATTRIBUTE_COLLECTION_NAME.toUpperCase(),
+    paramMap.put(SearchBloxConfig.ATTRIBUTE_COLLECTION_NAME.toUpperCase(Locale.ROOT),
         "");
 
   }

Modified: manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxDocument.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxDocument.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxDocument.java (original)
+++ manifoldcf/trunk/connectors/searchblox/connector/src/main/java/org/apache/manifoldcf/agents/output/searchblox/SearchBloxDocument.java Fri Aug 12 22:20:00 2016
@@ -95,7 +95,7 @@ public class SearchBloxDocument {
   public SearchBloxDocument(String apikey, String documentURI,
       RepositoryDocument rd, Map<String, List<String>> args) {
     this(apikey);
-    SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT);
+    SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT, Locale.ROOT);
 
     this.uid = documentURI;
     this.colName = args.get(SEARCHBLOX_COLLECTION).get(0);
@@ -143,7 +143,7 @@ public class SearchBloxDocument {
       try {
         String[] values = rd.getFieldAsStrings(name);
         for (String value : values) {
-          String key = name.toLowerCase();
+          String key = name.toLowerCase(Locale.ROOT);
           int indexOf = xmlElements.indexOf(key);
           if(indexOf != 5)
             if (indexOf != -1 &&

Modified: manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/MatchMap.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/MatchMap.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/MatchMap.java (original)
+++ manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/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/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/MockSolrService.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/MockSolrService.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/MockSolrService.java (original)
+++ manifoldcf/trunk/connectors/solr/connector/src/test/java/org/apache/manifoldcf/agents/output/solr/tests/MockSolrService.java Fri Aug 12 22:20:00 2016
@@ -108,8 +108,8 @@ public class MockSolrService
     {
       res.setStatus(HttpServletResponse.SC_OK);
       res.setContentType("application/xml; charset=utf-8");
-      res.getWriter().printf("<solr>\n");
-      res.getWriter().printf("</solr>\n");
+      res.getWriter().printf(Locale.ROOT, "<solr>\n");
+      res.getWriter().printf(Locale.ROOT, "</solr>\n");
       res.getWriter().flush();
     }
     
@@ -118,9 +118,9 @@ public class MockSolrService
     {
       res.setStatus(HttpServletResponse.SC_OK);
       res.setContentType("application/xml; charset=utf-8");
-      res.getWriter().printf("<result>\n");
-      res.getWriter().printf("  <doc name=\"something\"/>\n");
-      res.getWriter().printf("</result>\n");
+      res.getWriter().printf(Locale.ROOT, "<result>\n");
+      res.getWriter().printf(Locale.ROOT, "  <doc name=\"something\"/>\n");
+      res.getWriter().printf(Locale.ROOT, "</result>\n");
       res.getWriter().flush();
     }
     
@@ -129,9 +129,9 @@ public class MockSolrService
     {
       res.setStatus(HttpServletResponse.SC_OK);
       res.setContentType("application/xml; charset=utf-8");
-      res.getWriter().printf("<result>\n");
-      res.getWriter().printf("  <doc name=\"something\"/>\n");
-      res.getWriter().printf("</result>\n");
+      res.getWriter().printf(Locale.ROOT, "<result>\n");
+      res.getWriter().printf(Locale.ROOT, "  <doc name=\"something\"/>\n");
+      res.getWriter().printf(Locale.ROOT, "</result>\n");
       res.getWriter().flush();
     }
     

Modified: manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FindHTMLFormHandler.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FindHTMLFormHandler.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FindHTMLFormHandler.java (original)
+++ manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FindHTMLFormHandler.java Fri Aug 12 22:20:00 2016
@@ -120,7 +120,7 @@ public class FindHTMLFormHandler extends
         if (method == null || method.length() == 0)
           method = "get";
         else
-          method = method.toLowerCase();
+          method = method.toLowerCase(Locale.ROOT);
 
         // Start a new form
         currentFormData = new FormDataAccumulator(actionURI,method.equals("post")?FormData.SUBMITMETHOD_POST:FormData.SUBMITMETHOD_GET);

Modified: manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FormDataAccumulator.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FormDataAccumulator.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FormDataAccumulator.java (original)
+++ manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FormDataAccumulator.java Fri Aug 12 22:20:00 2016
@@ -55,7 +55,7 @@ public class FormDataAccumulator impleme
     String name = (String)attributes.get("name");
     if (name != null)
     {
-      String lowerType = type.toLowerCase();
+      String lowerType = type.toLowerCase(Locale.ROOT);
       if (lowerType.equals("submit"))
       {
         String value = (String)attributes.get("value");

Modified: manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FormParseState.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FormParseState.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FormParseState.java (original)
+++ manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/FormParseState.java Fri Aug 12 22:20:00 2016
@@ -66,7 +66,9 @@ public class FormParseState extends Link
       {
         String type = (String)attributes.get("type");
         // We're only interested in form elements that can actually transmit data
-        if (type == null || (!type.toLowerCase().equals("button") && !type.toLowerCase().equals("reset") && !type.toLowerCase().equals("image")))
+        if (type == null || (!type.toLowerCase(Locale.ROOT).equals("button")
+            && !type.toLowerCase(Locale.ROOT).equals("reset")
+            && !type.toLowerCase(Locale.ROOT).equals("image")))
           handler.noteFormInput(attributes);
       }
       else if (tagName.equals("select"))
@@ -87,7 +89,7 @@ public class FormParseState extends Link
       else if (tagName.equals("button"))
       {
         String type = (String)attributes.get("type");
-        if (type == null || type.toLowerCase().equals("submit"))
+        if (type == null || type.toLowerCase(Locale.ROOT).equals("submit"))
         {
           // Same as input type="submit"
           handler.noteFormInput(attributes);

Modified: manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/RobotsManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/RobotsManager.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/RobotsManager.java (original)
+++ manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/RobotsManager.java Fri Aug 12 22:20:00 2016
@@ -352,7 +352,7 @@ public class RobotsManager extends org.a
 
       boolean sawAgent = false;
 
-      String userAgentUpper = userAgent.toUpperCase();
+      String userAgentUpper = userAgent.toUpperCase(Locale.ROOT);
 
       int i = 0;
       while (i < records.size())
@@ -432,7 +432,7 @@ public class RobotsManager extends org.a
           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)
@@ -885,7 +885,7 @@ public class RobotsManager extends org.a
       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)

Modified: manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java (original)
+++ manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java Fri Aug 12 22:20:00 2016
@@ -5387,7 +5387,7 @@ public class WebcrawlerConnector extends
     String rval = hostName + ":" + port;
     // For backwards compatibility, only tack on the protocol if the protocol is not http
     if (!protocol.equalsIgnoreCase("http"))
-      rval = protocol.toLowerCase()+":"+rval;
+      rval = protocol.toLowerCase(Locale.ROOT)+":"+rval;
     return rval;
   }
 
@@ -6152,12 +6152,12 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException
     {
       String name = (String)metaAttributes.get("name");
-      if (name != null && name.toLowerCase().equals("robots"))
+      if (name != null && name.toLowerCase(Locale.ROOT).equals("robots"))
       {
         String contentValue = (String)metaAttributes.get("content");
         if (contentValue != null)
         {
-          contentValue = contentValue.toLowerCase();
+          contentValue = contentValue.toLowerCase(Locale.ROOT);
           // Parse content value
           try
           {
@@ -7749,16 +7749,16 @@ public class WebcrawlerConnector extends
             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/webcrawler/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/webcrawler/tests/MockSessionWebService.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/webcrawler/tests/MockSessionWebService.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/webcrawler/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/webcrawler/tests/MockSessionWebService.java (original)
+++ manifoldcf/trunk/connectors/webcrawler/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/webcrawler/tests/MockSessionWebService.java Fri Aug 12 22:20:00 2016
@@ -222,15 +222,15 @@ public class MockSessionWebService
       res.setStatus(HttpServletResponse.SC_OK);
       res.setContentType("text/html; charset=utf-8");
 
-      res.getWriter().printf("<html>\n");
-      res.getWriter().printf("  <body>\n");
-      res.getWriter().printf("    <form name=\"login\" action=\""+actionURI+"\">\n");
-      res.getWriter().printf("      User name: <input type=\"text\" name=\"user\" value=\"\" size=\"20\"/>\n");
-      res.getWriter().printf("      Password: <input type=\"password\" name=\"password\" value=\"\" size=\"20\"/>\n");
-      res.getWriter().printf("      <input type=\"submit\"/>\n");
-      res.getWriter().printf("    </form>\n");
-      res.getWriter().printf("  </body>\n");
-      res.getWriter().printf("</html>\n");
+      res.getWriter().printf(Locale.ROOT, "<html>\n");
+      res.getWriter().printf(Locale.ROOT, "  <body>\n");
+      res.getWriter().printf(Locale.ROOT, "    <form name=\"login\" action=\""+actionURI+"\">\n");
+      res.getWriter().printf(Locale.ROOT, "      User name: <input type=\"text\" name=\"user\" value=\"\" size=\"20\"/>\n");
+      res.getWriter().printf(Locale.ROOT, "      Password: <input type=\"password\" name=\"password\" value=\"\" size=\"20\"/>\n");
+      res.getWriter().printf(Locale.ROOT, "      <input type=\"submit\"/>\n");
+      res.getWriter().printf(Locale.ROOT, "    </form>\n");
+      res.getWriter().printf(Locale.ROOT, "  </body>\n");
+      res.getWriter().printf(Locale.ROOT, "</html>\n");
       
       res.getWriter().flush();
 
@@ -249,9 +249,9 @@ public class MockSessionWebService
       res.setStatus(HttpServletResponse.SC_OK);
       res.setContentType("text/html; charset=utf-8");
 
-      res.getWriter().printf("<html>\n");
-      res.getWriter().printf("  <body>This is the document content for item "+itemNumber+"</body>");
-      res.getWriter().printf("</html>\n");
+      res.getWriter().printf(Locale.ROOT, "<html>\n");
+      res.getWriter().printf(Locale.ROOT, "  <body>This is the document content for item "+itemNumber+"</body>");
+      res.getWriter().printf(Locale.ROOT, "</html>\n");
       
       res.getWriter().flush();
     }
@@ -269,16 +269,16 @@ public class MockSessionWebService
       res.setStatus(HttpServletResponse.SC_OK);
       res.setContentType("text/html; charset=utf-8");
 
-      res.getWriter().printf("<html>\n");
-      res.getWriter().printf("  <body>\n");
+      res.getWriter().printf(Locale.ROOT, "<html>\n");
+      res.getWriter().printf(Locale.ROOT, "  <body>\n");
 
       for (int i = 0; i < countItems; i++)
       {
         generateContentLink(res,i);
       }
       
-      res.getWriter().printf("  </body>\n");
-      res.getWriter().printf("</html>\n");
+      res.getWriter().printf(Locale.ROOT, "  </body>\n");
+      res.getWriter().printf(Locale.ROOT, "</html>\n");
       res.getWriter().flush();
 
     }
@@ -286,7 +286,7 @@ public class MockSessionWebService
     protected static void generateContentLink(HttpServletResponse res, int itemNumber)
       throws IOException
     {
-      res.getWriter().printf("    <a href=\"/web/protectedcontent.html?id="+itemNumber+"\">Item "+itemNumber+"</a>\n");
+      res.getWriter().printf(Locale.ROOT, "    <a href=\"/web/protectedcontent.html?id="+itemNumber+"\">Item "+itemNumber+"</a>\n");
     }
 
   }

Modified: manifoldcf/trunk/connectors/webcrawler/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/webcrawler/tests/MockWebService.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/webcrawler/tests/MockWebService.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/webcrawler/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/webcrawler/tests/MockWebService.java (original)
+++ manifoldcf/trunk/connectors/webcrawler/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/webcrawler/tests/MockWebService.java Fri Aug 12 22:20:00 2016
@@ -137,20 +137,20 @@ public class MockWebService
           // Generate a bad page.  This is a page with a non-200 return code, and with some content
           // > 1024 characters
           res.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
-          res.getWriter().printf("This is the error message for a 401 page.");
+          res.getWriter().printf(Locale.ROOT, "This is the error message for a 401 page.");
           for (int i = 0; i < 1000; i++)
           {
-            res.getWriter().printf(" Error message # "+i);
+            res.getWriter().printf(Locale.ROOT, " Error message # "+i);
           }
         }
         else
         {
           res.setStatus(HttpServletResponse.SC_OK);
           res.setContentType("text/html; charset=utf-8");
-          res.getWriter().printf("<html>\n");
-          res.getWriter().printf("  <body>\n");
+          res.getWriter().printf(Locale.ROOT, "<html>\n");
+          res.getWriter().printf(Locale.ROOT, "  <body>\n");
 
-          res.getWriter().printf("This is doc number "+theItem+" and level number "+theLevel+" in site "+site+"\n");
+          res.getWriter().printf(Locale.ROOT, "This is doc number "+theItem+" and level number "+theLevel+" in site "+site+"\n");
 
           // Generate links to all parents
           int parentLevel = theLevel;
@@ -178,8 +178,8 @@ public class MockWebService
             generateLink(res,site,theLevel,i);
           }
           
-          res.getWriter().printf("  </body>\n");
-          res.getWriter().printf("</html>\n");
+          res.getWriter().printf(Locale.ROOT, "  </body>\n");
+          res.getWriter().printf(Locale.ROOT, "</html>\n");
         }
         res.getWriter().flush();
       }
@@ -193,7 +193,7 @@ public class MockWebService
     protected void generateLink(HttpServletResponse res, String site, int level, int item)
       throws IOException
     {
-      res.getWriter().printf("    <a href=\"http://localhost:8191/web/gen.php?site="+site+"&level="+level+"&item="+item+"\"/>\n");
+      res.getWriter().printf(Locale.ROOT, "    <a href=\"http://localhost:8191/web/gen.php?site="+site+"&level="+level+"&item="+item+"\"/>\n");
     }
 
   }

Modified: manifoldcf/trunk/framework/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/build.xml?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/build.xml (original)
+++ manifoldcf/trunk/framework/build.xml Fri Aug 12 22:20:00 2016
@@ -160,6 +160,27 @@
         </fileset>
     </path>
 
+    <path id="all-classpath">
+        <fileset dir="../lib">
+            <include name="**/*.jar"/>
+        </fileset>
+        <fileset dir="../lib-proprietary">
+            <include name="**/*.jar"/>
+        </fileset>
+        <fileset dir="../connectors/alfresco/lib-proprietary">
+            <include name="**/*.jar"/>
+        </fileset>
+        <fileset dir="../connectors/jcifs/lib-proprietary">
+            <include name="**/*.jar"/>
+        </fileset>
+        <fileset dir="../connectors/kafka/test-materials">
+            <include name="**/*.jar"/>
+        </fileset>
+        <fileset dir="../connectors/elasticsearch/test-materials/elasticsearch-1.0.1/lib">
+            <include name="**/*.jar"/>
+        </fileset>
+    </path>
+
     <target name="file-resources">
         <mkdir dir="dist/file-resources"/>
         <copy todir="dist/file-resources">
@@ -2018,7 +2039,23 @@
           </classpath>
         </java>
     </target>
-    
+
+    <taskdef name="forbiddenapis" classname="de.thetaphi.forbiddenapis.ant.AntTask" classpath="../lib/forbiddenapis-2.2.jar"/>
+
+    <target name="forbidden-checks" depends="build">
+        <forbiddenapis failOnMissingClasses="false" targetVersion="1.7">
+            <classpath>
+                <path refid="all-classpath"/>
+            </classpath>
+            <bundledsignatures name="jdk-unsafe"/>
+            <!--<bundledsignatures name="jdk-deprecated"/>-->
+            <bundledsignatures name="jdk-non-portable"/>
+            <fileset dir="../">
+                <exclude name="**/target/**"/>
+            </fileset>
+        </forbiddenapis>
+    </target>
+
     <target name="build" depends="multi-process-zk-example,multi-process-zk-example-proprietary,multi-process-file-example,multi-process-file-example-proprietary,single-process-example,single-process-example-proprietary,example-common,script-engine,obfuscation-utility,file-resources,buildfiles,test-lib"/>
     
     <target name="all" depends="build,doc,build-tests,run-tests,run-tests-HSQLDB,run-tests-HSQLDBext"/>

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/common/DateParser.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/common/DateParser.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/common/DateParser.java (original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/common/DateParser.java Fri Aug 12 22:20:00 2016
@@ -69,7 +69,7 @@ public class DateParser
       }
       formatString = isoFormatString.toString();
     }
-    java.text.DateFormat iso8601Format = new java.text.SimpleDateFormat(formatString);
+    java.text.DateFormat iso8601Format = new java.text.SimpleDateFormat(formatString, Locale.ROOT);
     try
     {
       return iso8601Format.parse(isoDateValue);
@@ -89,7 +89,7 @@ public class DateParser
   */
   public static String formatISO8601Date(Date dateValue)
   {
-    java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+    java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.ROOT);
     df.setTimeZone(TimeZone.getTimeZone("GMT"));
     return df.format(dateValue);
   }
@@ -151,7 +151,7 @@ public class DateParser
     index = usable.indexOf(" ");
     if (index == -1)
       return null;
-    String month = usable.substring(0,index).toLowerCase();
+    String month = usable.substring(0,index).toLowerCase(Locale.ROOT);
     usable = usable.substring(index+1).trim();
 
     String year;
@@ -226,7 +226,7 @@ public class DateParser
 
     tz = TimeZone.getTimeZone(timezone);
 
-    Calendar c = new GregorianCalendar(tz);
+    Calendar c = new GregorianCalendar(tz, Locale.ROOT);
     try
     {
       int value = Integer.parseInt(year);
@@ -315,7 +315,7 @@ public class DateParser
         minute = dateValue;
     }
     TimeZone tz = TimeZone.getTimeZone("GMT");
-    Calendar c = new GregorianCalendar(tz);
+    Calendar c = new GregorianCalendar(tz, Locale.ROOT);
     try
     {
       int value = Integer.parseInt(year);

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java (original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java Fri Aug 12 22:20:00 2016
@@ -221,7 +221,7 @@ public class Messages
     String formatMessage;
     if (args != null)
     {
-      MessageFormat fm = new MessageFormat(message);
+      MessageFormat fm = new MessageFormat(message, Locale.ROOT);
       fm.setLocale(locale);
       formatMessage = fm.format(args);
     }
@@ -245,8 +245,10 @@ public class Messages
     String formatMessage;
     if (args != null)
     {
-      MessageFormat fm = new MessageFormat(message);
-      fm.setLocale(locale);
+      if (locale == null) {
+        locale = Locale.ROOT;
+      }
+      MessageFormat fm = new MessageFormat(message, locale);
       formatMessage = fm.format(args);
     }
     else

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java (original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java Fri Aug 12 22:20:00 2016
@@ -22,6 +22,7 @@ import org.apache.manifoldcf.core.interf
 import org.apache.manifoldcf.core.system.ManifoldCF;
 import org.apache.manifoldcf.core.system.Logging;
 import java.io.*;
+import java.nio.charset.StandardCharsets;
 
 /** One instance of this object exists for each lock on each JVM!
 * This is the file-system version of the lock.
@@ -324,10 +325,10 @@ public class FileLockObject extends Lock
   {
     try
     {
-      FileReader fr = new FileReader(lockFileName);
+      InputStreamReader isr = new InputStreamReader(new FileInputStream(lockFileName), StandardCharsets.UTF_8);
       try
       {
-        BufferedReader x = new BufferedReader(fr);
+        BufferedReader x = new BufferedReader(isr);
         try
         {
           StringBuilder sb = new StringBuilder();
@@ -375,7 +376,7 @@ public class FileLockObject extends Lock
       }
       finally
       {
-        fr.close();
+        isr.close();
       }
     }
     catch (InterruptedIOException e)
@@ -401,10 +402,10 @@ public class FileLockObject extends Lock
       }
       else
       {
-        FileWriter fw = new FileWriter(lockFileName);
+        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(lockFileName), StandardCharsets.UTF_8);
         try
         {
-          BufferedWriter x = new BufferedWriter(fw);
+          BufferedWriter x = new BufferedWriter(osw);
           try
           {
             x.write(Integer.toString(value));
@@ -416,7 +417,7 @@ public class FileLockObject extends Lock
         }
         finally
         {
-          fw.close();
+          osw.close();
         }
       }
     }

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java (original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java Fri Aug 12 22:20:00 2016
@@ -713,7 +713,7 @@ public class ManifoldCF
     try
     {
       SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
-      KeySpec keySpec = new PBEKeySpec(passCode.toCharArray(), saltValue.getBytes(), 1024, 128);
+      KeySpec keySpec = new PBEKeySpec(passCode.toCharArray(), saltValue.getBytes(StandardCharsets.UTF_8), 1024, 128);
       SecretKey secretKey = factory.generateSecret(keySpec);
 
       Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
@@ -1169,7 +1169,7 @@ public class ManifoldCF
           InputStream is = p.getErrorStream();
           try
           {
-            Reader r = new InputStreamReader(is);
+            Reader r = new InputStreamReader(is, StandardCharsets.UTF_8);
             try
             {
               BufferedReader br = new BufferedReader(r);

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/banner.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/banner.jsp?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/banner.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/banner.jsp Fri Aug 12 22:20:00 2016
@@ -1,3 +1,4 @@
+<%@ page import="java.text.DateFormat" %>
 <%@ include file="adminDefaults.jsp" %>
 
 <%
@@ -25,7 +26,7 @@
 <%
   // This module is meant to be called within a table cell, and will drop the
   // lcf banner into the cell
-  String dateString = java.text.DateFormat.getDateTimeInstance().format(new java.util.Date());
+  String dateString = java.text.DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM, Locale.ROOT).format(new java.util.Date());
 %>
 
 <table class="bannertable">

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp Fri Aug 12 22:20:00 2016
@@ -118,7 +118,7 @@ try
     else
     {
       // Convert the specified times to a long.
-      Calendar c = new GregorianCalendar();
+      Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
       c.set(Calendar.YEAR,Integer.parseInt(startYear));
       c.set(Calendar.MONTH,Integer.parseInt(startMonth));
       c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(startDay) + 1);
@@ -134,7 +134,7 @@ try
     else
     {
       // Convert the specified times to a long.
-      Calendar c = new GregorianCalendar();
+      Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
       c.set(Calendar.YEAR,Integer.parseInt(endYear));
       c.set(Calendar.MONTH,Integer.parseInt(endMonth));
       c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(endDay) + 1);
@@ -156,7 +156,7 @@ try
   else
   {
     // Do the conversion
-    Calendar c = new GregorianCalendar();
+    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
     c.setTimeInMillis(startTime.longValue());
     startYear = Integer.toString(c.get(Calendar.YEAR));
     startMonth = Integer.toString(c.get(Calendar.MONTH));
@@ -177,7 +177,7 @@ try
   else
   {
     // Do the conversion
-    Calendar c = new GregorianCalendar();
+    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
     c.setTimeInMillis(endTime.longValue());
     endYear = Integer.toString(c.get(Calendar.YEAR));
     endMonth = Integer.toString(c.get(Calendar.MONTH));

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp Fri Aug 12 22:20:00 2016
@@ -118,7 +118,7 @@ try
     else
     {
       // Convert the specified times to a long.
-      Calendar c = new GregorianCalendar();
+      Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
       c.set(Calendar.YEAR,Integer.parseInt(startYear));
       c.set(Calendar.MONTH,Integer.parseInt(startMonth));
       c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(startDay) + 1);
@@ -134,7 +134,7 @@ try
     else
     {
       // Convert the specified times to a long.
-      Calendar c = new GregorianCalendar();
+      Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
       c.set(Calendar.YEAR,Integer.parseInt(endYear));
       c.set(Calendar.MONTH,Integer.parseInt(endMonth));
       c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(endDay) + 1);
@@ -156,7 +156,7 @@ try
   else
   {
     // Do the conversion
-    Calendar c = new GregorianCalendar();
+    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
     c.setTimeInMillis(startTime.longValue());
     startYear = Integer.toString(c.get(Calendar.YEAR));
     startMonth = Integer.toString(c.get(Calendar.MONTH));
@@ -177,7 +177,7 @@ try
   else
   {
     // Do the conversion
-    Calendar c = new GregorianCalendar();
+    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
     c.setTimeInMillis(endTime.longValue());
     endYear = Integer.toString(c.get(Calendar.YEAR));
     endMonth = Integer.toString(c.get(Calendar.MONTH));

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/resultreport.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/resultreport.jsp?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/resultreport.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/resultreport.jsp Fri Aug 12 22:20:00 2016
@@ -118,7 +118,7 @@ try
     else
     {
       // Convert the specified times to a long.
-      Calendar c = new GregorianCalendar();
+      Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
       c.set(Calendar.YEAR,Integer.parseInt(startYear));
       c.set(Calendar.MONTH,Integer.parseInt(startMonth));
       c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(startDay) + 1);
@@ -134,7 +134,7 @@ try
     else
     {
       // Convert the specified times to a long.
-      Calendar c = new GregorianCalendar();
+      Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
       c.set(Calendar.YEAR,Integer.parseInt(endYear));
       c.set(Calendar.MONTH,Integer.parseInt(endMonth));
       c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(endDay) + 1);
@@ -156,7 +156,7 @@ try
   else
   {
     // Do the conversion
-    Calendar c = new GregorianCalendar();
+    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
     c.setTimeInMillis(startTime.longValue());
     startYear = Integer.toString(c.get(Calendar.YEAR));
     startMonth = Integer.toString(c.get(Calendar.MONTH));
@@ -176,7 +176,7 @@ try
   else
   {
     // Do the conversion
-    Calendar c = new GregorianCalendar();
+    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
     c.setTimeInMillis(endTime.longValue());
     endYear = Integer.toString(c.get(Calendar.YEAR));
     endMonth = Integer.toString(c.get(Calendar.MONTH));

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp Fri Aug 12 22:20:00 2016
@@ -118,7 +118,7 @@ try
     else
     {
       // Convert the specified times to a long.
-      Calendar c = new GregorianCalendar();
+      Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
       c.set(Calendar.YEAR,Integer.parseInt(startYear));
       c.set(Calendar.MONTH,Integer.parseInt(startMonth));
       c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(startDay) + 1);
@@ -134,7 +134,7 @@ try
     else
     {
       // Convert the specified times to a long.
-      Calendar c = new GregorianCalendar();
+      Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
       c.set(Calendar.YEAR,Integer.parseInt(endYear));
       c.set(Calendar.MONTH,Integer.parseInt(endMonth));
       c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(endDay) + 1);
@@ -156,7 +156,7 @@ try
   else
   {
     // Do the conversion
-    Calendar c = new GregorianCalendar();
+    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
     c.setTimeInMillis(startTime.longValue());
     startYear = Integer.toString(c.get(Calendar.YEAR));
     startMonth = Integer.toString(c.get(Calendar.MONTH));
@@ -176,7 +176,7 @@ try
   else
   {
     // Do the conversion
-    Calendar c = new GregorianCalendar();
+    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
     c.setTimeInMillis(endTime.longValue());
     endYear = Integer.toString(c.get(Calendar.YEAR));
     endMonth = Integer.toString(c.get(Calendar.MONTH));

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java (original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java Fri Aug 12 22:20:00 2016
@@ -170,7 +170,7 @@ public class RunDocumentStatus
     while (i < rval.length)
     {
       String state = states[i].trim();
-      Integer value = (Integer)stateMap.get(state.toLowerCase());
+      Integer value = (Integer)stateMap.get(state.toLowerCase(Locale.ROOT));
       if (value == null)
         throw new ManifoldCFException("State value of '"+state+"' is illegal");
       rval[i++] = value.intValue();
@@ -202,7 +202,7 @@ public class RunDocumentStatus
     while (i < rval.length)
     {
       String status = statuses[i].trim();
-      Integer value = (Integer)statusMap.get(status.toLowerCase());
+      Integer value = (Integer)statusMap.get(status.toLowerCase(Locale.ROOT));
       if (value == null)
         throw new ManifoldCFException("Status value of '"+status+"' is illegal");
       rval[i++] = value.intValue();

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java (original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java Fri Aug 12 22:20:00 2016
@@ -172,7 +172,7 @@ public class RunQueueStatus
     while (i < rval.length)
     {
       String state = states[i].trim();
-      Integer value = (Integer)stateMap.get(state.toLowerCase());
+      Integer value = (Integer)stateMap.get(state.toLowerCase(Locale.ROOT));
       if (value == null)
         throw new ManifoldCFException("State value of '"+state+"' is illegal");
       rval[i++] = value.intValue();
@@ -204,7 +204,7 @@ public class RunQueueStatus
     while (i < rval.length)
     {
       String status = statuses[i].trim();
-      Integer value = (Integer)statusMap.get(status.toLowerCase());
+      Integer value = (Integer)statusMap.get(status.toLowerCase(Locale.ROOT));
       if (value == null)
         throw new ManifoldCFException("Status value of '"+status+"' is illegal");
       rval[i++] = value.intValue();

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java (original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java Fri Aug 12 22:20:00 2016
@@ -6246,11 +6246,11 @@ public class JobManager implements IJobM
     Calendar c;
     if (timezone == null)
     {
-      c = Calendar.getInstance();
+      c = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.ROOT);
     }
     else
     {
-      c = Calendar.getInstance(TimeZone.getTimeZone(timezone));
+      c = Calendar.getInstance(TimeZone.getTimeZone(timezone), Locale.ROOT);
     }
 
     // Get the current starting time

Modified: manifoldcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/ScriptParser.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/ScriptParser.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/ScriptParser.java (original)
+++ manifoldcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/ScriptParser.java Fri Aug 12 22:20:00 2016
@@ -1307,7 +1307,7 @@ public class ScriptParser
       }
       else
       {
-        reader = new InputStreamReader(System.in);
+        reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
       
         while (true)
         {

Modified: manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java (original)
+++ manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java Fri Aug 12 22:20:00 2016
@@ -184,7 +184,7 @@ public class Messages extends org.apache
         String key = i.next();
         String value = substitutionParameters.get(key);
         if (mapToUpperCase)
-          key = key.toUpperCase();
+          key = key.toUpperCase(Locale.ROOT);
         if (value == null)
           value = "";
              
@@ -263,7 +263,7 @@ public class Messages extends org.apache
               String key = i.next();
               String value = substitutionParameters.get(key);
               if (mapToUpperCase)
-                key = key.toUpperCase();
+                key = key.toUpperCase(Locale.ROOT);
               if (value == null)
                 value = "";
               //System.out.println("Processed key = '"+key+"', processed value = '"+value+"'");

Modified: manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Formatter.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Formatter.java?rev=1756230&r1=1756229&r2=1756230&view=diff
==============================================================================
--- manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Formatter.java (original)
+++ manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Formatter.java Fri Aug 12 22:20:00 2016
@@ -32,7 +32,7 @@ public class Formatter
   */
   public static String formatTime(long time)
   {
-    Calendar c = new GregorianCalendar();
+    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
     c.setTimeInMillis(time);
     // We want to format this string in a compact way:
     // mm-dd-yyyy hh:mm:ss.mmm



Mime
View raw message