You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flume.apache.org by "yangkun (JIRA)" <ji...@apache.org> on 2018/04/13 10:05:00 UTC
[jira] [Created] (FLUME-3230) ComponentConfigurationFactory#create
method should remove redundant type.toUpperCase invoke
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-unsubscribe@flume.apache.org
For additional commands, e-mail: issues-help@flume.apache.org