/** * Load from a file and merge it in * @param file file * @param validator properties validator * @throws IOException any IO problem * @throws BadConfigException if the file is invalid */ public void mergeFile(File file, InputPropertiesValidator validator) throws IOException, BadConfigException { ConfTreeSerDeser confTreeSerDeser = new ConfTreeSerDeser(); ConfTree tree = confTreeSerDeser.fromFile(file); ConfTreeOperations ops = new ConfTreeOperations(tree); ops.validate(validator); merge(ops.confTree); }
/** * Load from a file and merge it in * @param file file * @param validator properties validator * @throws IOException any IO problem * @throws BadConfigException if the file is invalid */ public void mergeFile(File file, InputPropertiesValidator validator) throws IOException, BadConfigException { ConfTreeSerDeser confTreeSerDeser = new ConfTreeSerDeser(); ConfTree tree = confTreeSerDeser.fromFile(file); ConfTreeOperations ops = new ConfTreeOperations(tree); ops.validate(validator); merge(ops.confTree); }