private static void readAndMergeOptionsFromAuxInput(final ProgramOptions progOpts) throws CommandException { final String auxInput = progOpts.getAuxInput(); if (auxInput == null || auxInput.length() == 0) { return; } final ParameterMap newParamMap = new ParameterMap(); /* * We will place the options passed via the aux. input on the command * line and we do not want to repeat the read from stdin again, so * remove the aux input setting. */ progOpts.setAuxInput(null); try { final AsadminInput.InputReader reader = AsadminInput.reader(auxInput); final Properties newOptions = reader.settings().get("option"); for (String propName : newOptions.stringPropertyNames()) { newParamMap.add(propName, newOptions.getProperty(propName)); } progOpts.updateOptions(newParamMap); } catch (Exception ex) { throw new RuntimeException(ex); } }
private static void readAndMergeOptionsFromAuxInput(final ProgramOptions progOpts) throws CommandException { final String auxInput = progOpts.getAuxInput(); if (auxInput == null || auxInput.length() == 0) { return; } final ParameterMap newParamMap = new ParameterMap(); /* * We will place the options passed via the aux. input on the command * line and we do not want to repeat the read from stdin again, so * remove the aux input setting. */ progOpts.setAuxInput(null); try { final AsadminInput.InputReader reader = AsadminInput.reader(auxInput); final Properties newOptions = reader.settings().get("option"); for (String propName : newOptions.stringPropertyNames()) { newParamMap.add(propName, newOptions.getProperty(propName)); } progOpts.updateOptions(newParamMap); } catch (Exception ex) { throw new RuntimeException(ex); } }