CmdLineParser: Remove unused prefix argument
Change-Id: I52718b3b1552164d2b262c099f5864392c4f7699
This commit is contained in:
parent
ee5d1ec950
commit
8c380ffca3
|
@ -395,7 +395,7 @@ public class CmdLineParser {
|
||||||
|
|
||||||
MyParser(Object bean) {
|
MyParser(Object bean) {
|
||||||
super(bean);
|
super(bean);
|
||||||
parseAdditionalOptions("", bean, new HashSet<>());
|
parseAdditionalOptions(bean, new HashSet<>());
|
||||||
ensureOptionsInitialized();
|
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 (Class<?> c = bean.getClass(); c != null; c = c.getSuperclass()) {
|
||||||
for (Field f : c.getDeclaredFields()) {
|
for (Field f : c.getDeclaredFields()) {
|
||||||
if (f.isAnnotationPresent(Options.class)) {
|
if (f.isAnnotationPresent(Options.class)) {
|
||||||
|
@ -443,8 +443,7 @@ public class CmdLineParser {
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
throw new IllegalAnnotationError(e);
|
throw new IllegalAnnotationError(e);
|
||||||
}
|
}
|
||||||
parseWithPrefix(
|
parseWithPrefix(f.getAnnotation(Options.class).prefix(), additionalBean, parsedBeans);
|
||||||
prefix + f.getAnnotation(Options.class).prefix(), additionalBean, parsedBeans);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue