< prev index next >

test/jdk/tools/pack200/Utils.java

Print this page
rev 50498 : 8199871: Deprecate pack200 and unpack200 tools
Reviewed-by:

*** 495,504 **** --- 495,508 ---- static List<String> runExec(List<String> cmdsList) { return runExec(cmdsList, null); } static List<String> runExec(List<String> cmdsList, Map<String, String> penv) { + return runExec(cmdsList, penv, false); + } + + static List<String> runExec(List<String> cmdsList, Map<String, String> penv, boolean ignoreReturnValue) { ArrayList<String> alist = new ArrayList<String>(); ProcessBuilder pb = new ProcessBuilder(cmdsList); Map<String, String> env = pb.environment(); if (penv != null && !penv.isEmpty()) {
*** 527,537 **** alist.add(in); System.out.println(in); in = rd.readLine(); } retval = p.waitFor(); ! if (retval != 0) { throw new RuntimeException("process failed with non-zero exit"); } } catch (Exception ex) { throw new RuntimeException(ex.getMessage()); } finally { --- 531,541 ---- alist.add(in); System.out.println(in); in = rd.readLine(); } retval = p.waitFor(); ! if (!ignoreReturnValue && retval != 0) { throw new RuntimeException("process failed with non-zero exit"); } } catch (Exception ex) { throw new RuntimeException(ex.getMessage()); } finally {
< prev index next >