flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r1349081 - /incubator/flume/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
Date Tue, 12 Jun 2012 01:08:44 GMT
Author: will
Date: Tue Jun 12 01:08:44 2012
New Revision: 1349081

URL: http://svn.apache.org/viewvc?rev=1349081&view=rev
Log:
FLUME-1271. Incorrect configuration causes NPE.

(Hari Shreedharan via Will McQueen)

Modified:
    incubator/flume/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java

Modified: incubator/flume/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/flume/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java?rev=1349081&r1=1349080&r2=1349081&view=diff
==============================================================================
--- incubator/flume/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
(original)
+++ incubator/flume/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
Tue Jun 12 01:08:44 2012
@@ -58,14 +58,14 @@ public class SourceConfiguration extends
       if (channelList != null) {
         this.channels =
             new HashSet<String>(Arrays.asList(channelList.split("\\s+")));
-        if (channels.isEmpty()) {
-          errors.add(new FlumeConfigurationError(componentName,
-              ComponentType.CHANNEL.getComponentType(),
-              FlumeConfigurationErrorType.PROPERTY_VALUE_NULL,
-              ErrorOrWarning.ERROR));
-          throw new ConfigurationException("No channels set for "
-              + this.getComponentName());
-        }
+      }
+      if (channels.isEmpty()) {
+        errors.add(new FlumeConfigurationError(componentName,
+            ComponentType.CHANNEL.getComponentType(),
+            FlumeConfigurationErrorType.PROPERTY_VALUE_NULL,
+            ErrorOrWarning.ERROR));
+        throw new ConfigurationException("No channels set for "
+            + this.getComponentName());
       }
       Map<String, String> selectorParams = context.getSubProperties(
               BasicConfigurationConstants.CONFIG_SOURCE_CHANNELSELECTOR_PREFIX);



Mime
View raw message