flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hshreedha...@apache.org
Subject git commit: FLUME-2475. toLowerCase/toUpperCase must specify Locale.
Date Fri, 10 Oct 2014 17:45:02 GMT
Repository: flume
Updated Branches:
  refs/heads/trunk 7ffbd86bc -> f17c7d502


FLUME-2475. toLowerCase/toUpperCase must specify Locale.

(Santiago M. Mola via Hari)


Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/f17c7d50
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/f17c7d50
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/f17c7d50

Branch: refs/heads/trunk
Commit: f17c7d5022d3e9d112a3843909ad523535fe7e4f
Parents: 7ffbd86
Author: Hari Shreedharan <hshreedharan@apache.org>
Authored: Fri Oct 10 10:43:58 2014 -0700
Committer: Hari Shreedharan <hshreedharan@apache.org>
Committed: Fri Oct 10 10:44:55 2014 -0700

----------------------------------------------------------------------
 .../file/encryption/CipherProviderFactory.java        |  3 ++-
 .../channel/file/encryption/KeyProviderFactory.java   |  4 +++-
 .../org/apache/flume/channel/jdbc/DatabaseType.java   |  4 +++-
 .../flume/channel/jdbc/TransactionIsolation.java      |  3 ++-
 .../flume/channel/jdbc/TestDatabaseTypeEnum.java      |  3 ++-
 .../jdbc/TestTransactionIsolationLevelEnum.java       |  3 ++-
 .../flume/clients/log4jappender/Log4jAvroHeaders.java |  4 +++-
 .../flume/conf/ComponentConfigurationFactory.java     | 14 ++++++++------
 .../org/apache/flume/conf/FlumeConfiguration.java     |  7 ++++---
 .../apache/flume/conf/source/SourceConfiguration.java |  3 ++-
 .../apache/flume/channel/ChannelSelectorFactory.java  |  3 ++-
 .../apache/flume/channel/DefaultChannelFactory.java   |  4 +++-
 .../client/avro/ReliableSpoolingFileEventReader.java  |  2 +-
 .../flume/instrumentation/MonitoredCounterGroup.java  |  5 +++--
 .../flume/interceptor/InterceptorBuilderFactory.java  |  4 +++-
 .../flume/serialization/AvroEventDeserializer.java    |  3 ++-
 .../flume/serialization/EventDeserializerFactory.java |  4 +++-
 .../flume/serialization/EventSerializerFactory.java   |  4 +++-
 .../apache/flume/serialization/LineDeserializer.java  |  1 -
 .../org/apache/flume/sink/DefaultSinkFactory.java     |  4 +++-
 .../org/apache/flume/sink/SinkProcessorFactory.java   |  5 +++--
 .../org/apache/flume/source/DefaultSourceFactory.java |  4 +++-
 .../org/apache/flume/source/SpoolDirectorySource.java |  5 +++--
 .../java/org/apache/flume/source/SyslogUtils.java     |  2 +-
 .../org/apache/flume/tools/DirectMemoryUtils.java     |  5 +++--
 .../java/org/apache/flume/tools/PlatformDetect.java   |  4 +++-
 .../agent/embedded/EmbeddedAgentConfiguration.java    |  3 ++-
 .../main/java/org/apache/flume/node/Application.java  |  3 ++-
 .../java/org/apache/flume/api/RpcClientFactory.java   |  3 ++-
 .../java/org/apache/flume/sink/kite/DatasetSink.java  |  3 ++-
 .../apache/flume/sink/hdfs/AvroEventSerializer.java   |  3 ++-
 .../java/org/apache/flume/source/jms/JMSSource.java   |  5 +++--
 .../java/org/apache/flume/tools/FlumeToolType.java    |  4 +++-
 33 files changed, 86 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/CipherProviderFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/CipherProviderFactory.java
b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/CipherProviderFactory.java
index d5e9353..ca11f6b 100644
--- a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/CipherProviderFactory.java
+++ b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/CipherProviderFactory.java
@@ -19,6 +19,7 @@
 package org.apache.flume.channel.file.encryption;
 
 import java.security.Key;
+import java.util.Locale;
 
 import org.apache.flume.FlumeException;
 import org.slf4j.Logger;
@@ -54,7 +55,7 @@ public class CipherProviderFactory {
     // try to find builder class in enum of known providers
     CipherProviderType type;
     try {
-      type = CipherProviderType.valueOf(cipherProviderType.toUpperCase());
+      type = CipherProviderType.valueOf(cipherProviderType.toUpperCase(Locale.ENGLISH));
     } catch (IllegalArgumentException e) {
       logger.debug("Not in enum, loading provider class: {}", cipherProviderType);
       type = CipherProviderType.OTHER;

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/KeyProviderFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/KeyProviderFactory.java
b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/KeyProviderFactory.java
index 60d51ed..c45f35a 100644
--- a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/KeyProviderFactory.java
+++ b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/KeyProviderFactory.java
@@ -18,6 +18,8 @@
  */
 package org.apache.flume.channel.file.encryption;
 
+import java.util.Locale;
+
 import org.apache.flume.Context;
 import org.apache.flume.FlumeException;
 import org.slf4j.Logger;
@@ -37,7 +39,7 @@ public class KeyProviderFactory {
     // try to find builder class in enum of known providers
     KeyProviderType type;
     try {
-      type = KeyProviderType.valueOf(keyProviderType.toUpperCase());
+      type = KeyProviderType.valueOf(keyProviderType.toUpperCase(Locale.ENGLISH));
     } catch (IllegalArgumentException e) {
       logger.debug("Not in enum, loading provider class: {}", keyProviderType);
       type = KeyProviderType.OTHER;

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/DatabaseType.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/DatabaseType.java
b/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/DatabaseType.java
index e26cb84..183a731 100644
--- a/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/DatabaseType.java
+++ b/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/DatabaseType.java
@@ -17,6 +17,8 @@
  */
 package org.apache.flume.channel.jdbc;
 
+import java.util.Locale;
+
 public enum DatabaseType {
   /** All other databases */
   OTHER("OTHER", null),
@@ -56,7 +58,7 @@ public enum DatabaseType {
   public static DatabaseType getByName(String dbName) {
     DatabaseType type = null;
     try {
-      type = DatabaseType.valueOf(dbName.trim().toUpperCase());
+      type = DatabaseType.valueOf(dbName.trim().toUpperCase(Locale.ENGLISH));
     } catch (IllegalArgumentException ex) {
       type = DatabaseType.OTHER;
     }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/TransactionIsolation.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/TransactionIsolation.java
b/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/TransactionIsolation.java
index ed157cf..5cc2489 100644
--- a/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/TransactionIsolation.java
+++ b/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/TransactionIsolation.java
@@ -18,6 +18,7 @@
 package org.apache.flume.channel.jdbc;
 
 import java.sql.Connection;
+import java.util.Locale;
 
 public enum TransactionIsolation {
 
@@ -47,6 +48,6 @@ public enum TransactionIsolation {
   }
 
   public static TransactionIsolation getByName(String name) {
-    return valueOf(name.trim().toUpperCase());
+    return valueOf(name.trim().toUpperCase(Locale.ENGLISH));
   }
 }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestDatabaseTypeEnum.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestDatabaseTypeEnum.java
b/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestDatabaseTypeEnum.java
index 55ad1eb..39f488c 100644
--- a/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestDatabaseTypeEnum.java
+++ b/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestDatabaseTypeEnum.java
@@ -18,6 +18,7 @@
 package org.apache.flume.channel.jdbc;
 
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
 
 import org.junit.Assert;
@@ -61,7 +62,7 @@ public class TestDatabaseTypeEnum {
       Assert.assertSame(type, lookupType);
       Assert.assertEquals(key, lookupTypeName);
 
-      DatabaseType lookupType2 = DatabaseType.getByName(key.toLowerCase());
+      DatabaseType lookupType2 = DatabaseType.getByName(key.toLowerCase(Locale.ENGLISH));
       Assert.assertSame(type, lookupType2);
     }
   }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestTransactionIsolationLevelEnum.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestTransactionIsolationLevelEnum.java
b/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestTransactionIsolationLevelEnum.java
index ea0bac3..b9f35c6 100644
--- a/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestTransactionIsolationLevelEnum.java
+++ b/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestTransactionIsolationLevelEnum.java
@@ -18,6 +18,7 @@
 package org.apache.flume.channel.jdbc;
 
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
 
 import org.junit.Assert;
@@ -62,7 +63,7 @@ public class TestTransactionIsolationLevelEnum {
       Assert.assertEquals(key, lookupTxIsolationName);
 
       TransactionIsolation lookupTxIsolation2 =
-          TransactionIsolation.getByName(key.toLowerCase());
+          TransactionIsolation.getByName(key.toLowerCase(Locale.ENGLISH));
       Assert.assertSame(txIsolation, lookupTxIsolation2);
     }
   }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAvroHeaders.java
----------------------------------------------------------------------
diff --git a/flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAvroHeaders.java
b/flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAvroHeaders.java
index 08a7203..b68e749 100644
--- a/flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAvroHeaders.java
+++ b/flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAvroHeaders.java
@@ -18,6 +18,8 @@
  */
 package org.apache.flume.clients.log4jappender;
 
+import java.util.Locale;
+
 public enum Log4jAvroHeaders {
   OTHER("flume.client.log4j.logger.other"),
   LOGGER_NAME("flume.client.log4j.logger.name"),
@@ -43,7 +45,7 @@ public enum Log4jAvroHeaders {
   public static Log4jAvroHeaders getByName(String headerName){
     Log4jAvroHeaders hdrs = null;
     try{
-      hdrs = Log4jAvroHeaders.valueOf(headerName.toLowerCase().trim());
+      hdrs = Log4jAvroHeaders.valueOf(headerName.toLowerCase(Locale.ENGLISH).trim());
     }
     catch(IllegalArgumentException e){
       hdrs = Log4jAvroHeaders.OTHER;

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java
b/flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java
index c867a03..0433c9c 100644
--- a/flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java
+++ b/flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java
@@ -16,6 +16,8 @@
  */
 package org.apache.flume.conf;
 
+import java.util.Locale;
+
 import org.apache.flume.conf.ComponentConfiguration.ComponentType;
 import org.apache.flume.conf.channel.ChannelConfiguration.ChannelConfigurationType;
 import org.apache.flume.conf.channel.ChannelSelectorConfiguration.ChannelSelectorConfigurationType;
@@ -40,22 +42,22 @@ public class ComponentConfigurationFactory {
       return confType.getConstructor(String.class).newInstance(type);
     } catch (Exception ignored) {
       try {
-        type = type.toUpperCase();
+        type = type.toUpperCase(Locale.ENGLISH);
         switch(component){
           case SOURCE:
-            return SourceConfigurationType.valueOf(type.toUpperCase())
+            return SourceConfigurationType.valueOf(type.toUpperCase(Locale.ENGLISH))
                 .getConfiguration(name);
           case SINK:
-            return SinkConfigurationType.valueOf(type.toUpperCase())
+            return SinkConfigurationType.valueOf(type.toUpperCase(Locale.ENGLISH))
                 .getConfiguration(name);
           case CHANNEL:
-            return ChannelConfigurationType.valueOf(type.toUpperCase())
+            return ChannelConfigurationType.valueOf(type.toUpperCase(Locale.ENGLISH))
                 .getConfiguration(name);
           case SINK_PROCESSOR:
-            return SinkProcessorConfigurationType.valueOf(type.toUpperCase())
+            return SinkProcessorConfigurationType.valueOf(type.toUpperCase(Locale.ENGLISH))
                 .getConfiguration(name);
           case CHANNELSELECTOR:
-            return ChannelSelectorConfigurationType.valueOf(type.toUpperCase())
+            return ChannelSelectorConfigurationType.valueOf(type.toUpperCase(Locale.ENGLISH))
                 .getConfiguration(name);
           case SINKGROUP:
             return new SinkGroupConfiguration(name);

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-configuration/src/main/java/org/apache/flume/conf/FlumeConfiguration.java
----------------------------------------------------------------------
diff --git a/flume-ng-configuration/src/main/java/org/apache/flume/conf/FlumeConfiguration.java
b/flume-ng-configuration/src/main/java/org/apache/flume/conf/FlumeConfiguration.java
index f214149..5997406 100644
--- a/flume-ng-configuration/src/main/java/org/apache/flume/conf/FlumeConfiguration.java
+++ b/flume-ng-configuration/src/main/java/org/apache/flume/conf/FlumeConfiguration.java
@@ -24,6 +24,7 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
@@ -457,7 +458,7 @@ public class FlumeConfiguration {
               configSpecified = true;
             }
           } else {
-            config = chType.toString().toUpperCase();
+            config = chType.toString().toUpperCase(Locale.ENGLISH);
             configSpecified = true;
           }
 
@@ -553,7 +554,7 @@ public class FlumeConfiguration {
               configSpecified = true;
             }
           } else {
-            config = srcType.toString().toUpperCase();
+            config = srcType.toString().toUpperCase(Locale.ENGLISH);
             configSpecified = true;
           }
           try {
@@ -667,7 +668,7 @@ public class FlumeConfiguration {
               configSpecified = true;
             }
           } else {
-            config = sinkType.toString().toUpperCase();
+            config = sinkType.toString().toUpperCase(Locale.ENGLISH);
             configSpecified = true;
           }
           try {

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
----------------------------------------------------------------------
diff --git a/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
b/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
index 13c3360..899d805 100644
--- a/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
+++ b/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.flume.conf.source;
 
 import java.util.Arrays;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
@@ -93,7 +94,7 @@ public class SourceConfiguration extends ComponentConfiguration {
           config = "OTHER";
         }
       } else {
-        config = selectorType.toString().toUpperCase();
+        config = selectorType.toString().toUpperCase(Locale.ENGLISH);
       }
 
       this.selectorConf =

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/channel/ChannelSelectorFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/channel/ChannelSelectorFactory.java
b/flume-ng-core/src/main/java/org/apache/flume/channel/ChannelSelectorFactory.java
index 998c8c0..80b1453 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/channel/ChannelSelectorFactory.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/channel/ChannelSelectorFactory.java
@@ -19,6 +19,7 @@
 package org.apache.flume.channel;
 
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import org.apache.flume.Channel;
@@ -73,7 +74,7 @@ public class ChannelSelectorFactory {
     ChannelSelectorType  selectorType = ChannelSelectorType.OTHER;
 
     try {
-      selectorType = ChannelSelectorType.valueOf(type.toUpperCase());
+      selectorType = ChannelSelectorType.valueOf(type.toUpperCase(Locale.ENGLISH));
     } catch (IllegalArgumentException ex) {
       LOGGER.debug("Selector type {} is a custom type", type);
     }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/channel/DefaultChannelFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/channel/DefaultChannelFactory.java
b/flume-ng-core/src/main/java/org/apache/flume/channel/DefaultChannelFactory.java
index 06e1763..1dd124e 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/channel/DefaultChannelFactory.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/channel/DefaultChannelFactory.java
@@ -19,6 +19,8 @@
 
 package org.apache.flume.channel;
 
+import java.util.Locale;
+
 import org.apache.flume.Channel;
 import org.apache.flume.ChannelFactory;
 import org.apache.flume.FlumeException;
@@ -54,7 +56,7 @@ public class DefaultChannelFactory implements ChannelFactory {
     String channelClassName = type;
     ChannelType channelType = ChannelType.OTHER;
     try {
-      channelType = ChannelType.valueOf(type.toUpperCase());
+      channelType = ChannelType.valueOf(type.toUpperCase(Locale.ENGLISH));
     } catch (IllegalArgumentException ex) {
       logger.debug("Channel type {} is a custom type", type);
     }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java
b/flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java
index 0bc3f23..f858b56 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java
@@ -568,7 +568,7 @@ public class ReliableSpoolingFileEventReader implements ReliableEventReader
{
         SpoolDirectorySourceConfigurationConstants.DEFAULT_INPUT_CHARSET;
     private DecodeErrorPolicy decodeErrorPolicy = DecodeErrorPolicy.valueOf(
         SpoolDirectorySourceConfigurationConstants.DEFAULT_DECODE_ERROR_POLICY
-            .toUpperCase());
+            .toUpperCase(Locale.ENGLISH));
     private ConsumeOrder consumeOrder = 
         SpoolDirectorySourceConfigurationConstants.DEFAULT_CONSUME_ORDER;    
     

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/instrumentation/MonitoredCounterGroup.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/instrumentation/MonitoredCounterGroup.java
b/flume-ng-core/src/main/java/org/apache/flume/instrumentation/MonitoredCounterGroup.java
index 1d3f0f1..44e26e4 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/instrumentation/MonitoredCounterGroup.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/instrumentation/MonitoredCounterGroup.java
@@ -24,6 +24,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicLong;
 
@@ -105,7 +106,7 @@ public abstract class MonitoredCounterGroup {
     if (!registered) {
       try {
         ObjectName objName = new ObjectName("org.apache.flume."
-                + type.name().toLowerCase() + ":type=" + this.name);
+                + type.name().toLowerCase(Locale.ENGLISH) + ":type=" + this.name);
 
         if (ManagementFactory.getPlatformMBeanServer().isRegistered(objName)) {
           logger.debug("Monitored counter group for type: " + type + ", name: "
@@ -149,7 +150,7 @@ public abstract class MonitoredCounterGroup {
     logger.info("Component type: " + type + ", name: " + name + " stopped");
 
     // Retrieve the type for this counter group
-    final String typePrefix = type.name().toLowerCase();
+    final String typePrefix = type.name().toLowerCase(Locale.ENGLISH);
 
     // Print out the startTime for this component
     logger.info("Shutdown Metric for type: " + type + ", "

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorBuilderFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorBuilderFactory.java
b/flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorBuilderFactory.java
index 50e6fbc..7c64613 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorBuilderFactory.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorBuilderFactory.java
@@ -18,6 +18,8 @@
 
 package org.apache.flume.interceptor;
 
+import java.util.Locale;
+
 import org.apache.flume.interceptor.Interceptor.Builder;
 
 /**
@@ -28,7 +30,7 @@ public class InterceptorBuilderFactory {
 
   private static Class<? extends Builder> lookup(String name) {
     try {
-      return InterceptorType.valueOf(name.toUpperCase()).getBuilderClass();
+      return InterceptorType.valueOf(name.toUpperCase(Locale.ENGLISH)).getBuilderClass();
     } catch (IllegalArgumentException e) {
       return null;
     }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java
b/flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java
index e44978f..5faf449 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java
@@ -43,6 +43,7 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.security.NoSuchAlgorithmException;
 import java.util.List;
+import java.util.Locale;
 
 /**
  * A deserializer that parses Avro container files, generating one Flume event
@@ -83,7 +84,7 @@ public class AvroEventDeserializer implements EventDeserializer {
 
     schemaType = AvroSchemaType.valueOf(
         context.getString(CONFIG_SCHEMA_TYPE_KEY,
-            AvroSchemaType.HASH.toString()).toUpperCase());
+            AvroSchemaType.HASH.toString()).toUpperCase(Locale.ENGLISH));
     if (schemaType == AvroSchemaType.LITERAL) {
       logger.warn(CONFIG_SCHEMA_TYPE_KEY + " set to " +
           AvroSchemaType.LITERAL.toString() + ", so storing full Avro " +

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/serialization/EventDeserializerFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/serialization/EventDeserializerFactory.java
b/flume-ng-core/src/main/java/org/apache/flume/serialization/EventDeserializerFactory.java
index 80b9cc3..73a7761 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/serialization/EventDeserializerFactory.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/serialization/EventDeserializerFactory.java
@@ -26,6 +26,8 @@ import org.apache.flume.annotations.InterfaceStability;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.Locale;
+
 @InterfaceAudience.Private
 @InterfaceStability.Stable
 public class EventDeserializerFactory {
@@ -42,7 +44,7 @@ public class EventDeserializerFactory {
     // try to find builder class in enum of known output serializers
     EventDeserializerType type;
     try {
-      type = EventDeserializerType.valueOf(deserializerType.toUpperCase());
+      type = EventDeserializerType.valueOf(deserializerType.toUpperCase(Locale.ENGLISH));
     } catch (IllegalArgumentException e) {
       logger.debug("Not in enum, loading builder class: {}", deserializerType);
       type = EventDeserializerType.OTHER;

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializerFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializerFactory.java
b/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializerFactory.java
index dbb3935..9c3682f 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializerFactory.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializerFactory.java
@@ -20,6 +20,8 @@ package org.apache.flume.serialization;
 
 import com.google.common.base.Preconditions;
 import java.io.OutputStream;
+import java.util.Locale;
+
 import org.apache.flume.Context;
 import org.apache.flume.FlumeException;
 import org.apache.flume.annotations.InterfaceAudience;
@@ -43,7 +45,7 @@ public class EventSerializerFactory {
     // try to find builder class in enum of known output serializers
     EventSerializerType type;
     try {
-      type = EventSerializerType.valueOf(serializerType.toUpperCase());
+      type = EventSerializerType.valueOf(serializerType.toUpperCase(Locale.ENGLISH));
     } catch (IllegalArgumentException e) {
       logger.debug("Not in enum, loading builder class: {}", serializerType);
       type = EventSerializerType.OTHER;

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/serialization/LineDeserializer.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/serialization/LineDeserializer.java
b/flume-ng-core/src/main/java/org/apache/flume/serialization/LineDeserializer.java
index d8e5ae2..7c87235 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/serialization/LineDeserializer.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/serialization/LineDeserializer.java
@@ -30,7 +30,6 @@ import org.slf4j.LoggerFactory;
 import java.io.IOException;
 import java.nio.charset.Charset;
 import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * A deserializer that parses text lines from a file.

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/sink/DefaultSinkFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/sink/DefaultSinkFactory.java b/flume-ng-core/src/main/java/org/apache/flume/sink/DefaultSinkFactory.java
index 0e49e0b..6a5be92 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/sink/DefaultSinkFactory.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/sink/DefaultSinkFactory.java
@@ -19,6 +19,8 @@
 
 package org.apache.flume.sink;
 
+import java.util.Locale;
+
 import org.apache.flume.FlumeException;
 import org.apache.flume.Sink;
 import org.apache.flume.SinkFactory;
@@ -56,7 +58,7 @@ public class DefaultSinkFactory implements SinkFactory {
     String sinkClassName = type;
     SinkType sinkType = SinkType.OTHER;
     try {
-      sinkType = SinkType.valueOf(type.toUpperCase());
+      sinkType = SinkType.valueOf(type.toUpperCase(Locale.ENGLISH));
     } catch (IllegalArgumentException ex) {
       logger.debug("Sink type {} is a custom type", type);
     }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/sink/SinkProcessorFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/sink/SinkProcessorFactory.java b/flume-ng-core/src/main/java/org/apache/flume/sink/SinkProcessorFactory.java
index 1499872..dcdcad2 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/sink/SinkProcessorFactory.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/sink/SinkProcessorFactory.java
@@ -18,6 +18,7 @@
 package org.apache.flume.sink;
 
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import org.apache.flume.Context;
@@ -65,7 +66,7 @@ public class SinkProcessorFactory {
     SinkProcessorType type = SinkProcessorType.OTHER;
     String processorClassName = typeStr;
     try {
-      type = SinkProcessorType.valueOf(typeStr.toUpperCase());
+      type = SinkProcessorType.valueOf(typeStr.toUpperCase(Locale.ENGLISH));
     } catch (Exception ex) {
       logger.warn("Sink Processor type {} is a custom type", typeStr);
     }
@@ -103,7 +104,7 @@ public class SinkProcessorFactory {
     SinkProcessor processor;
     SinkProcessorType type = SinkProcessorType.DEFAULT;
     try {
-      type = SinkProcessorType.valueOf(typeStr.toUpperCase());
+      type = SinkProcessorType.valueOf(typeStr.toUpperCase(Locale.ENGLISH));
     } catch (Exception ex) {
       logger.warn("Sink type {} does not exist, using default", typeStr);
     }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/source/DefaultSourceFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/source/DefaultSourceFactory.java
b/flume-ng-core/src/main/java/org/apache/flume/source/DefaultSourceFactory.java
index 95cf13d..bb9d3f1 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/source/DefaultSourceFactory.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/source/DefaultSourceFactory.java
@@ -18,6 +18,8 @@
  */
 package org.apache.flume.source;
 
+import java.util.Locale;
+
 import org.apache.flume.FlumeException;
 import org.apache.flume.Source;
 import org.apache.flume.SourceFactory;
@@ -54,7 +56,7 @@ public class DefaultSourceFactory implements SourceFactory {
     String sourceClassName = type;
     SourceType srcType = SourceType.OTHER;
     try {
-      srcType = SourceType.valueOf(type.toUpperCase());
+      srcType = SourceType.valueOf(type.toUpperCase(Locale.ENGLISH));
     } catch (IllegalArgumentException ex) {
       logger.debug("Source type {} is a custom type", type);
     }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/source/SpoolDirectorySource.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/source/SpoolDirectorySource.java
b/flume-ng-core/src/main/java/org/apache/flume/source/SpoolDirectorySource.java
index d0c2e99..f5be9ae 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/source/SpoolDirectorySource.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/source/SpoolDirectorySource.java
@@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
 import java.io.File;
 import java.io.IOException;
 import java.util.List;
+import java.util.Locale;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
@@ -155,7 +156,7 @@ Configurable, EventDrivenSource {
     inputCharset = context.getString(INPUT_CHARSET, DEFAULT_INPUT_CHARSET);
     decodeErrorPolicy = DecodeErrorPolicy.valueOf(
         context.getString(DECODE_ERROR_POLICY, DEFAULT_DECODE_ERROR_POLICY)
-        .toUpperCase());
+        .toUpperCase(Locale.ENGLISH));
 
     ignorePattern = context.getString(IGNORE_PAT, DEFAULT_IGNORE_PAT);
     trackerDirPath = context.getString(TRACKER_DIR, DEFAULT_TRACKER_DIR);
@@ -165,7 +166,7 @@ Configurable, EventDrivenSource {
         "."));
     
     consumeOrder = ConsumeOrder.valueOf(context.getString(CONSUME_ORDER, 
-        DEFAULT_CONSUME_ORDER.toString()).toUpperCase());
+        DEFAULT_CONSUME_ORDER.toString()).toUpperCase(Locale.ENGLISH));
 
     // "Hack" to support backwards compatibility with previous generation of
     // spooling directory source, which did not support deserializers

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java b/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
index 43f8db0..50593a7 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
@@ -133,7 +133,7 @@ public class SyslogUtils {
       return null;
     }
 
-    keepFields = keepFields.trim().toLowerCase();
+    keepFields = keepFields.trim().toLowerCase(Locale.ENGLISH);
 
     if (keepFields.equals("false") || keepFields.equals("none")) {
       return null;

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/tools/DirectMemoryUtils.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/tools/DirectMemoryUtils.java b/flume-ng-core/src/main/java/org/apache/flume/tools/DirectMemoryUtils.java
index b12571b..8c2db2c 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/tools/DirectMemoryUtils.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/tools/DirectMemoryUtils.java
@@ -23,6 +23,7 @@ import java.lang.management.RuntimeMXBean;
 import java.lang.reflect.Method;
 import java.nio.ByteBuffer;
 import java.util.List;
+import java.util.Locale;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.slf4j.Logger;
@@ -82,8 +83,8 @@ public class DirectMemoryUtils {
     long multiplier = 1; //for the byte case.
     for (String s : arguments) {
       if (s.contains(MAX_DIRECT_MEMORY_PARAM)) {
-        String memSize = s.toLowerCase()
-            .replace(MAX_DIRECT_MEMORY_PARAM.toLowerCase(), "").trim();
+        String memSize = s.toLowerCase(Locale.ENGLISH)
+            .replace(MAX_DIRECT_MEMORY_PARAM.toLowerCase(Locale.ENGLISH), "").trim();
 
         if (memSize.contains("k")) {
           multiplier = 1024;

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-core/src/main/java/org/apache/flume/tools/PlatformDetect.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/tools/PlatformDetect.java b/flume-ng-core/src/main/java/org/apache/flume/tools/PlatformDetect.java
index 3beec06..94bab66 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/tools/PlatformDetect.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/tools/PlatformDetect.java
@@ -17,6 +17,8 @@
  */
 package org.apache.flume.tools;
 
+import java.util.Locale;
+
 /**
  * Utilities for platform & operating system detection
  */
@@ -28,7 +30,7 @@ public class PlatformDetect {
    */
   public static boolean isWindows() {
     String os = System.getProperty("os.name");
-    boolean isWin = (os.toLowerCase().indexOf("win") >= 0);
+    boolean isWin = (os.toLowerCase(Locale.ENGLISH).indexOf("win") >= 0);
     return isWin;
   }
 

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-embedded-agent/src/main/java/org/apache/flume/agent/embedded/EmbeddedAgentConfiguration.java
----------------------------------------------------------------------
diff --git a/flume-ng-embedded-agent/src/main/java/org/apache/flume/agent/embedded/EmbeddedAgentConfiguration.java
b/flume-ng-embedded-agent/src/main/java/org/apache/flume/agent/embedded/EmbeddedAgentConfiguration.java
index 02182dd..4a49fa0 100644
--- a/flume-ng-embedded-agent/src/main/java/org/apache/flume/agent/embedded/EmbeddedAgentConfiguration.java
+++ b/flume-ng-embedded-agent/src/main/java/org/apache/flume/agent/embedded/EmbeddedAgentConfiguration.java
@@ -21,6 +21,7 @@ package org.apache.flume.agent.embedded;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
@@ -172,7 +173,7 @@ public class EmbeddedAgentConfiguration {
     checkRequired(properties, SINKS);
     String sinkNames = properties.get(SINKS);
     for(String sink : sinkNames.split("\\s+")) {
-      if(DISALLOWED_SINK_NAMES.contains(sink.toLowerCase())) {
+      if(DISALLOWED_SINK_NAMES.contains(sink.toLowerCase(Locale.ENGLISH))) {
         throw new FlumeException("Sink name " + sink + " is one of the" +
             " disallowed sink names: " + DISALLOWED_SINK_NAMES);
       }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-node/src/main/java/org/apache/flume/node/Application.java
----------------------------------------------------------------------
diff --git a/flume-ng-node/src/main/java/org/apache/flume/node/Application.java b/flume-ng-node/src/main/java/org/apache/flume/node/Application.java
index 832285a..959fa77 100644
--- a/flume-ng-node/src/main/java/org/apache/flume/node/Application.java
+++ b/flume-ng-node/src/main/java/org/apache/flume/node/Application.java
@@ -23,6 +23,7 @@ import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.Set;
@@ -202,7 +203,7 @@ public class Application {
         try {
           //Is it a known type?
           klass = MonitoringType.valueOf(
-                  monitorType.toUpperCase()).getMonitorClass();
+                  monitorType.toUpperCase(Locale.ENGLISH)).getMonitorClass();
         } catch (Exception e) {
           //Not a known type, use FQCN
           klass = (Class<? extends MonitorService>) Class.forName(monitorType);

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-sdk/src/main/java/org/apache/flume/api/RpcClientFactory.java
----------------------------------------------------------------------
diff --git a/flume-ng-sdk/src/main/java/org/apache/flume/api/RpcClientFactory.java b/flume-ng-sdk/src/main/java/org/apache/flume/api/RpcClientFactory.java
index 00d9cf0..11bc94c 100644
--- a/flume-ng-sdk/src/main/java/org/apache/flume/api/RpcClientFactory.java
+++ b/flume-ng-sdk/src/main/java/org/apache/flume/api/RpcClientFactory.java
@@ -23,6 +23,7 @@ import java.io.FileNotFoundException;
 import java.io.FileReader;
 import java.io.IOException;
 import java.io.Reader;
+import java.util.Locale;
 import java.util.Properties;
 import org.apache.flume.FlumeException;
 
@@ -63,7 +64,7 @@ public class RpcClientFactory {
       String clientClassType = type;
       ClientType clientType = null;
       try{
-        clientType = ClientType.valueOf(type.toUpperCase());
+        clientType = ClientType.valueOf(type.toUpperCase(Locale.ENGLISH));
       } catch (IllegalArgumentException e){
         clientType = ClientType.OTHER;
       }

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-sinks/flume-dataset-sink/src/main/java/org/apache/flume/sink/kite/DatasetSink.java
----------------------------------------------------------------------
diff --git a/flume-ng-sinks/flume-dataset-sink/src/main/java/org/apache/flume/sink/kite/DatasetSink.java
b/flume-ng-sinks/flume-dataset-sink/src/main/java/org/apache/flume/sink/kite/DatasetSink.java
index a05d776..ebcc617 100644
--- a/flume-ng-sinks/flume-dataset-sink/src/main/java/org/apache/flume/sink/kite/DatasetSink.java
+++ b/flume-ng-sinks/flume-dataset-sink/src/main/java/org/apache/flume/sink/kite/DatasetSink.java
@@ -31,6 +31,7 @@ import java.net.URI;
 import java.net.URL;
 import java.security.PrivilegedExceptionAction;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.concurrent.ExecutionException;
 import org.apache.avro.Schema;
@@ -123,7 +124,7 @@ public class DatasetSink extends AbstractSink implements Configurable
{
           InputStream is = null;
           try {
             FileSystem fs = FileSystem.get(URI.create(url), conf);
-            if (url.toLowerCase().startsWith("hdfs:/")) {
+            if (url.toLowerCase(Locale.ENGLISH).startsWith("hdfs:/")) {
               is = fs.open(new Path(url));
             } else {
               is = new URL(url).openStream();

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/AvroEventSerializer.java
----------------------------------------------------------------------
diff --git a/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/AvroEventSerializer.java
b/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/AvroEventSerializer.java
index 4b8fc78..fea6218 100644
--- a/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/AvroEventSerializer.java
+++ b/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/AvroEventSerializer.java
@@ -24,6 +24,7 @@ import java.io.OutputStream;
 import java.net.URL;
 import java.nio.ByteBuffer;
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
 import org.apache.avro.AvroRuntimeException;
 import org.apache.avro.Schema;
@@ -144,7 +145,7 @@ public class AvroEventSerializer implements EventSerializer, Configurable
{
   private Schema loadFromUrl(String schemaUrl) throws IOException {
     Configuration conf = new Configuration();
     Schema.Parser parser = new Schema.Parser();
-    if (schemaUrl.toLowerCase().startsWith("hdfs://")) {
+    if (schemaUrl.toLowerCase(Locale.ENGLISH).startsWith("hdfs://")) {
       FileSystem fs = FileSystem.get(conf);
       FSDataInputStream input = null;
       try {

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java
----------------------------------------------------------------------
diff --git a/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java
b/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java
index addd97a..1d7f60f 100644
--- a/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java
+++ b/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java
@@ -20,6 +20,7 @@ package org.apache.flume.source.jms;
 import java.io.File;
 import java.io.IOException;
 import java.util.List;
+import java.util.Locale;
 import java.util.Properties;
 
 import javax.jms.ConnectionFactory;
@@ -101,11 +102,11 @@ public class JMSSource extends AbstractPollableSource {
         DESTINATION_NAME, "").trim();
 
     String destinationTypeName = context.getString(JMSSourceConfiguration.
-        DESTINATION_TYPE, "").trim().toUpperCase();
+        DESTINATION_TYPE, "").trim().toUpperCase(Locale.ENGLISH);
 
     String destinationLocatorName = context.getString(JMSSourceConfiguration.
         DESTINATION_LOCATOR, JMSSourceConfiguration.DESTINATION_LOCATOR_DEFAULT)
-      .trim().toUpperCase();
+      .trim().toUpperCase(Locale.ENGLISH);
 
     messageSelector = context.getString(JMSSourceConfiguration.
         MESSAGE_SELECTOR, "").trim();

http://git-wip-us.apache.org/repos/asf/flume/blob/f17c7d50/flume-tools/src/main/java/org/apache/flume/tools/FlumeToolType.java
----------------------------------------------------------------------
diff --git a/flume-tools/src/main/java/org/apache/flume/tools/FlumeToolType.java b/flume-tools/src/main/java/org/apache/flume/tools/FlumeToolType.java
index f886c89..1bb122d 100644
--- a/flume-tools/src/main/java/org/apache/flume/tools/FlumeToolType.java
+++ b/flume-tools/src/main/java/org/apache/flume/tools/FlumeToolType.java
@@ -18,6 +18,8 @@
  */
 package org.apache.flume.tools;
 
+import java.util.Locale;
+
 public enum FlumeToolType {
   FCINTEGRITYTOOL(FileChannelIntegrityTool.class);
 
@@ -33,7 +35,7 @@ public enum FlumeToolType {
   public static String getNames() {
     StringBuilder builder = new StringBuilder();
     for(FlumeToolType type: values()) {
-      builder.append(type.name().toLowerCase() + "\n");
+      builder.append(type.name().toLowerCase(Locale.ENGLISH) + "\n");
     }
     return builder.toString();
   }


Mime
View raw message