Merge "CmdLineParser: Remove unused prefix argument"
This commit is contained in:
commit
96ff91165c
@ -395,7 +395,7 @@ public class CmdLineParser {
|
||||
|
||||
MyParser(Object bean) {
|
||||
super(bean);
|
||||
parseAdditionalOptions("", bean, new HashSet<>());
|
||||
parseAdditionalOptions(bean, new HashSet<>());
|
||||
ensureOptionsInitialized();
|
||||
}
|
||||
|
||||
@ -433,7 +433,7 @@ public class CmdLineParser {
|
||||
}
|
||||
}
|
||||
|
||||
private void parseAdditionalOptions(String prefix, Object bean, Set<Object> parsedBeans) {
|
||||
private void parseAdditionalOptions(Object bean, Set<Object> parsedBeans) {
|
||||
for (Class<?> c = bean.getClass(); c != null; c = c.getSuperclass()) {
|
||||
for (Field f : c.getDeclaredFields()) {
|
||||
if (f.isAnnotationPresent(Options.class)) {
|
||||
@ -443,8 +443,7 @@ public class CmdLineParser {
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new IllegalAnnotationError(e);
|
||||
}
|
||||
parseWithPrefix(
|
||||
prefix + f.getAnnotation(Options.class).prefix(), additionalBean, parsedBeans);
|
||||
parseWithPrefix(f.getAnnotation(Options.class).prefix(), additionalBean, parsedBeans);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user