Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2475

toLowerCase/toUpperCase used without Locale parameter to manipulate Enum

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.0.1
    • Fix Version/s: 1.6.0
    • Component/s: None
    • Labels:
      None

      Description

      .toLowerCase() / .toUpperCase() is used intensively in Flume's code base without passing Locale.ENGLISH to it. This breaks Flume depending on the system locale.

      1. FLUME-2475-0.patch
        39 kB
        Santiago M. Mola

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in flume-trunk #672 (See https://builds.apache.org/job/flume-trunk/672/)
          FLUME-2475. toLowerCase/toUpperCase must specify Locale. (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=f17c7d5022d3e9d112a3843909ad523535fe7e4f)

          • flume-ng-core/src/main/java/org/apache/flume/source/DefaultSourceFactory.java
          • flume-ng-core/src/main/java/org/apache/flume/tools/DirectMemoryUtils.java
          • flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
          • flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java
          • flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorBuilderFactory.java
          • flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/AvroEventSerializer.java
          • flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java
          • flume-ng-core/src/main/java/org/apache/flume/source/SpoolDirectorySource.java
          • flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
          • flume-ng-configuration/src/main/java/org/apache/flume/conf/FlumeConfiguration.java
          • flume-ng-sdk/src/main/java/org/apache/flume/api/RpcClientFactory.java
          • flume-ng-node/src/main/java/org/apache/flume/node/Application.java
          • flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestDatabaseTypeEnum.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/CipherProviderFactory.java
          • flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java
          • flume-ng-sinks/flume-dataset-sink/src/main/java/org/apache/flume/sink/kite/DatasetSink.java
          • flume-ng-core/src/main/java/org/apache/flume/channel/DefaultChannelFactory.java
          • flume-ng-core/src/main/java/org/apache/flume/channel/ChannelSelectorFactory.java
          • flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAvroHeaders.java
          • flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializerFactory.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/KeyProviderFactory.java
          • flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java
          • flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestTransactionIsolationLevelEnum.java
          • flume-ng-core/src/main/java/org/apache/flume/sink/DefaultSinkFactory.java
          • flume-ng-core/src/main/java/org/apache/flume/tools/PlatformDetect.java
          • flume-ng-core/src/main/java/org/apache/flume/instrumentation/MonitoredCounterGroup.java
          • flume-ng-embedded-agent/src/main/java/org/apache/flume/agent/embedded/EmbeddedAgentConfiguration.java
          • flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/DatabaseType.java
          • flume-ng-core/src/main/java/org/apache/flume/serialization/EventDeserializerFactory.java
          • flume-ng-core/src/main/java/org/apache/flume/sink/SinkProcessorFactory.java
          • flume-tools/src/main/java/org/apache/flume/tools/FlumeToolType.java
          • flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/TransactionIsolation.java
          • flume-ng-core/src/main/java/org/apache/flume/serialization/LineDeserializer.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in flume-trunk #672 (See https://builds.apache.org/job/flume-trunk/672/ ) FLUME-2475 . toLowerCase/toUpperCase must specify Locale. (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=f17c7d5022d3e9d112a3843909ad523535fe7e4f ) flume-ng-core/src/main/java/org/apache/flume/source/DefaultSourceFactory.java flume-ng-core/src/main/java/org/apache/flume/tools/DirectMemoryUtils.java flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorBuilderFactory.java flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/AvroEventSerializer.java flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java flume-ng-core/src/main/java/org/apache/flume/source/SpoolDirectorySource.java flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java flume-ng-configuration/src/main/java/org/apache/flume/conf/FlumeConfiguration.java flume-ng-sdk/src/main/java/org/apache/flume/api/RpcClientFactory.java flume-ng-node/src/main/java/org/apache/flume/node/Application.java flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestDatabaseTypeEnum.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/CipherProviderFactory.java flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java flume-ng-sinks/flume-dataset-sink/src/main/java/org/apache/flume/sink/kite/DatasetSink.java flume-ng-core/src/main/java/org/apache/flume/channel/DefaultChannelFactory.java flume-ng-core/src/main/java/org/apache/flume/channel/ChannelSelectorFactory.java flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAvroHeaders.java flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializerFactory.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/KeyProviderFactory.java flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestTransactionIsolationLevelEnum.java flume-ng-core/src/main/java/org/apache/flume/sink/DefaultSinkFactory.java flume-ng-core/src/main/java/org/apache/flume/tools/PlatformDetect.java flume-ng-core/src/main/java/org/apache/flume/instrumentation/MonitoredCounterGroup.java flume-ng-embedded-agent/src/main/java/org/apache/flume/agent/embedded/EmbeddedAgentConfiguration.java flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/DatabaseType.java flume-ng-core/src/main/java/org/apache/flume/serialization/EventDeserializerFactory.java flume-ng-core/src/main/java/org/apache/flume/sink/SinkProcessorFactory.java flume-tools/src/main/java/org/apache/flume/tools/FlumeToolType.java flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/TransactionIsolation.java flume-ng-core/src/main/java/org/apache/flume/serialization/LineDeserializer.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Flume-trunk-hbase-98 #32 (See https://builds.apache.org/job/Flume-trunk-hbase-98/32/)
          FLUME-2475. toLowerCase/toUpperCase must specify Locale. (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=f17c7d5022d3e9d112a3843909ad523535fe7e4f)

          • flume-ng-configuration/src/main/java/org/apache/flume/conf/FlumeConfiguration.java
          • flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java
          • flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializerFactory.java
          • flume-ng-core/src/main/java/org/apache/flume/source/SpoolDirectorySource.java
          • flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
          • flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java
          • flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/AvroEventSerializer.java
          • flume-ng-sdk/src/main/java/org/apache/flume/api/RpcClientFactory.java
          • flume-ng-core/src/main/java/org/apache/flume/instrumentation/MonitoredCounterGroup.java
          • flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/TransactionIsolation.java
          • flume-ng-core/src/main/java/org/apache/flume/serialization/LineDeserializer.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/CipherProviderFactory.java
          • flume-tools/src/main/java/org/apache/flume/tools/FlumeToolType.java
          • flume-ng-core/src/main/java/org/apache/flume/channel/DefaultChannelFactory.java
          • flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestTransactionIsolationLevelEnum.java
          • flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestDatabaseTypeEnum.java
          • flume-ng-core/src/main/java/org/apache/flume/tools/PlatformDetect.java
          • flume-ng-core/src/main/java/org/apache/flume/channel/ChannelSelectorFactory.java
          • flume-ng-core/src/main/java/org/apache/flume/serialization/EventDeserializerFactory.java
          • flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
          • flume-ng-node/src/main/java/org/apache/flume/node/Application.java
          • flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAvroHeaders.java
          • flume-ng-core/src/main/java/org/apache/flume/sink/SinkProcessorFactory.java
          • flume-ng-core/src/main/java/org/apache/flume/sink/DefaultSinkFactory.java
          • flume-ng-sinks/flume-dataset-sink/src/main/java/org/apache/flume/sink/kite/DatasetSink.java
          • flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/DatabaseType.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/KeyProviderFactory.java
          • flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java
          • flume-ng-core/src/main/java/org/apache/flume/source/DefaultSourceFactory.java
          • flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java
          • flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorBuilderFactory.java
          • flume-ng-embedded-agent/src/main/java/org/apache/flume/agent/embedded/EmbeddedAgentConfiguration.java
          • flume-ng-core/src/main/java/org/apache/flume/tools/DirectMemoryUtils.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Flume-trunk-hbase-98 #32 (See https://builds.apache.org/job/Flume-trunk-hbase-98/32/ ) FLUME-2475 . toLowerCase/toUpperCase must specify Locale. (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=f17c7d5022d3e9d112a3843909ad523535fe7e4f ) flume-ng-configuration/src/main/java/org/apache/flume/conf/FlumeConfiguration.java flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializerFactory.java flume-ng-core/src/main/java/org/apache/flume/source/SpoolDirectorySource.java flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/AvroEventSerializer.java flume-ng-sdk/src/main/java/org/apache/flume/api/RpcClientFactory.java flume-ng-core/src/main/java/org/apache/flume/instrumentation/MonitoredCounterGroup.java flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/TransactionIsolation.java flume-ng-core/src/main/java/org/apache/flume/serialization/LineDeserializer.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/CipherProviderFactory.java flume-tools/src/main/java/org/apache/flume/tools/FlumeToolType.java flume-ng-core/src/main/java/org/apache/flume/channel/DefaultChannelFactory.java flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestTransactionIsolationLevelEnum.java flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestDatabaseTypeEnum.java flume-ng-core/src/main/java/org/apache/flume/tools/PlatformDetect.java flume-ng-core/src/main/java/org/apache/flume/channel/ChannelSelectorFactory.java flume-ng-core/src/main/java/org/apache/flume/serialization/EventDeserializerFactory.java flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java flume-ng-node/src/main/java/org/apache/flume/node/Application.java flume-ng-clients/flume-ng-log4jappender/src/main/java/org/apache/flume/clients/log4jappender/Log4jAvroHeaders.java flume-ng-core/src/main/java/org/apache/flume/sink/SinkProcessorFactory.java flume-ng-core/src/main/java/org/apache/flume/sink/DefaultSinkFactory.java flume-ng-sinks/flume-dataset-sink/src/main/java/org/apache/flume/sink/kite/DatasetSink.java flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/DatabaseType.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/KeyProviderFactory.java flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java flume-ng-core/src/main/java/org/apache/flume/source/DefaultSourceFactory.java flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorBuilderFactory.java flume-ng-embedded-agent/src/main/java/org/apache/flume/agent/embedded/EmbeddedAgentConfiguration.java flume-ng-core/src/main/java/org/apache/flume/tools/DirectMemoryUtils.java
          Hide
          hshreedharan Hari Shreedharan added a comment -

          Committed! Thanks Santiago!

          Show
          hshreedharan Hari Shreedharan added a comment - Committed! Thanks Santiago!
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit ca86d4f6e8c3a575eff731e0f5f06de6894c0b84 in flume's branch refs/heads/flume-1.6 from Hari Shreedharan
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=ca86d4f ]

          FLUME-2475. toLowerCase/toUpperCase must specify Locale.

          (Santiago M. Mola via Hari)

          Show
          jira-bot ASF subversion and git services added a comment - Commit ca86d4f6e8c3a575eff731e0f5f06de6894c0b84 in flume's branch refs/heads/flume-1.6 from Hari Shreedharan [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=ca86d4f ] FLUME-2475 . toLowerCase/toUpperCase must specify Locale. (Santiago M. Mola via Hari)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f17c7d5022d3e9d112a3843909ad523535fe7e4f in flume's branch refs/heads/trunk from Hari Shreedharan
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=f17c7d5 ]

          FLUME-2475. toLowerCase/toUpperCase must specify Locale.

          (Santiago M. Mola via Hari)

          Show
          jira-bot ASF subversion and git services added a comment - Commit f17c7d5022d3e9d112a3843909ad523535fe7e4f in flume's branch refs/heads/trunk from Hari Shreedharan [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=f17c7d5 ] FLUME-2475 . toLowerCase/toUpperCase must specify Locale. (Santiago M. Mola via Hari)
          Hide
          hshreedharan Hari Shreedharan added a comment -

          +1

          Show
          hshreedharan Hari Shreedharan added a comment - +1
          Hide
          smolav Santiago M. Mola added a comment -

          Sorry for the delay. Here's the updated patch.

          Show
          smolav Santiago M. Mola added a comment - Sorry for the delay. Here's the updated patch.
          Hide
          hshreedharan Hari Shreedharan added a comment -

          Ping

          Show
          hshreedharan Hari Shreedharan added a comment - Ping
          Hide
          hshreedharan Hari Shreedharan added a comment -

          Santiago:

          This patch does not apply. Can you rebase this patch?

          Show
          hshreedharan Hari Shreedharan added a comment - Santiago: This patch does not apply. Can you rebase this patch?

            People

            • Assignee:
              smolav Santiago M. Mola
              Reporter:
              smolav Santiago M. Mola
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development