- private static NetconfClientDispatcherImpl configureClientDispatcher(final NioEventLoopGroup nioGroup,
- final Timer timer) {
- final NetconfClientDispatcherImpl netconfClientDispatcher;
- if (params.exi) {
- if (params.legacyFraming) {
- netconfClientDispatcher = ConfigurableClientDispatcher.createLegacyExi(nioGroup, nioGroup, timer);
- } else {
- netconfClientDispatcher = ConfigurableClientDispatcher.createChunkedExi(nioGroup, nioGroup, timer);
- }
- } else if (params.legacyFraming) {
- netconfClientDispatcher = ConfigurableClientDispatcher.createLegacy(nioGroup, nioGroup, timer);
- } else {
- netconfClientDispatcher = ConfigurableClientDispatcher.createChunked(nioGroup, nioGroup, timer);
- }
- return netconfClientDispatcher;
- }
-
- private static Parameters parseArgs(final String[] args, final ArgumentParser parser) {
- final Parameters opt = new Parameters();
+ @SuppressFBWarnings(value = "DM_EXIT", justification = "Exit from CLI with error without throwing an exception")
+ private static boolean initParameters(final String[] args) {
+ final var parser = Parameters.getParser();
+ params = new Parameters();