@Test public void w_libjars_w_temporary() throws Exception { File cacheRepo = folder.newFolder(); conf.set(LauncherOptionsParser.KEY_CACHE_REPOSITORY, cacheRepo.toURI().toString()); File temporary = folder.newFolder(); conf.set(LauncherOptionsParser.KEY_CACHE_TEMPORARY, temporary.getPath()); File lib = putFile("dummy.jar"); parse(new String[] { MockTool.class.getName(), LauncherOptionsParser.KEY_ARG_LIBRARIES, lib.getPath(), }); assertThat(temporary.list(), arrayWithSize(greaterThan(0))); }
public static LauncherOptions parse( Configuration configuration, String... args) throws IOException, InterruptedException { LauncherOptionsParser parser = new LauncherOptionsParser(configuration, args); boolean success = false; try { LauncherOptions result = parser.analyze(); success = true; return result; } finally { parser.cleanUp(success); } }
LauncherOptionsParser { public static LauncherOptions parse( Configuration configuration, String... args) throws IOException, InterruptedException { LauncherOptionsParser parser = new LauncherOptionsParser(configuration, args); boolean success = false; try { LauncherOptions result = parser.analyze(); success = true; return result; } finally { parser.cleanUp(success); } } }
LauncherOptionsParser { public static LauncherOptions parse( Configuration configuration, String... args) throws IOException, InterruptedException { LauncherOptionsParser parser = new LauncherOptionsParser(configuration, args); boolean success = false; try { LauncherOptions result = parser.analyze(); success = true; return result; } finally { parser.cleanUp(success); } } private  LauncherOptionsParser(Configuration configuration, String[] args); }
LauncherOptionsParser { public static LauncherOptions parse( Configuration configuration, String... args) throws IOException, InterruptedException { LauncherOptionsParser parser = new LauncherOptionsParser(configuration, args); boolean success = false; try { LauncherOptions result = parser.analyze(); success = true; return result; } finally { parser.cleanUp(success); } } private  LauncherOptionsParser(Configuration configuration, String[] args); static LauncherOptions parse(
            Configuration configuration,
            String... args); }
LauncherOptionsParser { public static LauncherOptions parse( Configuration configuration, String... args) throws IOException, InterruptedException { LauncherOptionsParser parser = new LauncherOptionsParser(configuration, args); boolean success = false; try { LauncherOptions result = parser.analyze(); success = true; return result; } finally { parser.cleanUp(success); } } private  LauncherOptionsParser(Configuration configuration, String[] args); static LauncherOptions parse(
            Configuration configuration,
            String... args); static final String KEY_CACHE_ENABLED; static final String KEY_CACHE_REPOSITORY; static final String KEY_CACHE_RETRY_COUNT; static final String KEY_CACHE_RETRY_INTERVAL; static final String KEY_CACHE_TEMPORARY; static final String KEY_MAX_THREADS; static final String KEY_CACHE_JOBJAR; }