diff -r 253adb0f4301 -r c11c2b9b45a5 jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java --- a/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java Wed Sep 23 08:43:51 2015 +0200 +++ b/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java Wed Sep 23 11:18:34 2015 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; - +import java.security.AccessController; +import java.security.PrivilegedAction; /** * This class is used to create operating system processes. * @@ -445,6 +446,7 @@ *
It will always be true that + *
{@code + * Redirect.DISCARD.file() the filename appropriate for the operating system + * and may be null && + * Redirect.DISCARD.type() == Redirect.Type.WRITE && + * Redirect.DISCARD.append() == false + * }+ * @since 9 + */ + public static final Redirect DISCARD = new Redirect() { + public Type type() { return Type.WRITE; } + public String toString() { return type().toString(); } + public File file() { return NULL_FILE; } + boolean append() { return false; } + }; + /** * Returns the {@link File} source or destination associated * with this redirect, or {@code null} if there is no such file.