yangkun created FLUME-3230:
------------------------------

             Summary: ComponentConfigurationFactory#create method should remove 
redundant type.toUpperCase invoke
                 Key: FLUME-3230
                 URL: https://issues.apache.org/jira/browse/FLUME-3230
             Project: Flume
          Issue Type: Improvement
            Reporter: yangkun


follow is a code snippet of ComponentConfigurationFactory#create() method 

 

try {
  confType = (Class<? extends ComponentConfiguration>) Class.forName(type);
  return confType.getConstructor(String.class).newInstance(type);
} catch (Exception ignored) {
  try {
    {color:#FF0000}// has been invoke type.toUpperCase(Locale.ENGLISH){color}
    type = type.toUpperCase(Locale.ENGLISH);
    switch (component) {
      case SOURCE:
      {color:#FF0000}// here, no need invoke type.toUpperCase(Locale.ENGLISH) 
again, it's redundant, should remove{color}
        return SourceConfigurationType.valueOf(type.toUpperCase(Locale.ENGLISH))
    }
}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@flume.apache.org
For additional commands, e-mail: issues-h...@flume.apache.org

Reply via email to