@Test public void loadProperties_local() throws Exception { Properties p = new Properties(); p.setProperty("hello", "world!"); File file = store(p); Properties loaded = CommandLineUtil.loadProperties(file); assertThat(loaded, is(p)); }
public static Properties loadProperties(File path) throws IOException { if (path == null) { throw new IllegalArgumentException("path must not be null"); } LOG.debug("Loading properties: {}", path); try (FileInputStream in = new FileInputStream(path)) { Properties properties = new Properties(); properties.load(in); return properties; } }
CommandLineUtil { public static Properties loadProperties(File path) throws IOException { if (path == null) { throw new IllegalArgumentException("path must not be null"); } LOG.debug("Loading properties: {}", path); try (FileInputStream in = new FileInputStream(path)) { Properties properties = new Properties(); properties.load(in); return properties; } } }
CommandLineUtil { public static Properties loadProperties(File path) throws IOException { if (path == null) { throw new IllegalArgumentException("path must not be null"); } LOG.debug("Loading properties: {}", path); try (FileInputStream in = new FileInputStream(path)) { Properties properties = new Properties(); properties.load(in); return properties; } } private  CommandLineUtil(); }
CommandLineUtil { public static Properties loadProperties(File path) throws IOException { if (path == null) { throw new IllegalArgumentException("path must not be null"); } LOG.debug("Loading properties: {}", path); try (FileInputStream in = new FileInputStream(path)) { Properties properties = new Properties(); properties.load(in); return properties; } } private  CommandLineUtil(); static void prepareLogContext(); static Properties loadProperties(File path); static List<File> parseFileList(String fileListOrNull); static ClassLoader buildPluginLoader(ClassLoader parent, List<File> files); static List<Extension> loadExtensions(ClassLoader classLoader, List<ExtendedArgument> arguments); }
CommandLineUtil { public static Properties loadProperties(File path) throws IOException { if (path == null) { throw new IllegalArgumentException("path must not be null"); } LOG.debug("Loading properties: {}", path); try (FileInputStream in = new FileInputStream(path)) { Properties properties = new Properties(); properties.load(in); return properties; } } private  CommandLineUtil(); static void prepareLogContext(); static Properties loadProperties(File path); static List<File> parseFileList(String fileListOrNull); static ClassLoader buildPluginLoader(ClassLoader parent, List<File> files); static List<Extension> loadExtensions(ClassLoader classLoader, List<ExtendedArgument> arguments); static final String LOG_CONTEXT_PREFIX; static final String SCHEME_CLASSPATH; }