RFR: 8132541 : (process) ProcessBuilder support for redirection to discard output
Roger Riggs
Roger.Riggs at Oracle.com
Tue Sep 22 13:27:36 UTC 2015
Hi Martin,
Please take another look?
The language has been updated so it does not require discarding using a
file.
The URI of the webrev changed also:
http://cr.openjdk.java.net/~rriggs/webrev-discard-8132541/
Thanks, Roger
On 9/22/2015 2:52 AM, Martin Buchholz wrote:
>
>
> On Mon, Sep 21, 2015 at 11:28 AM, Roger Riggs <Roger.Riggs at oracle.com
> <mailto:Roger.Riggs at oracle.com>> wrote:
>
> Hi Martin,
>
> On 09/21/2015 02:18 PM, Martin Buchholz wrote:
>>
>> I'm not sure that all operating systems where Java may run will
>> have such a "null file" (does OS400?).
> True, but there are multiple ways to discard the output and it
> need not be via the null file,
> that's just easy on Unix and Windows.
> The Redirect.file() method is allowed to return null and I've
> updated the description to reinforce that for OS's that discard
> the output some other way.
>
>
> That seems to contradict what I see here:
> + /**
> + * Indicates that subprocess output will be discarded.
> + * The output is discarded by writing to the operating specific
> + * <em>null</em> file.
> + *
> + * <p>It will always be true that
> + * <pre> {@code
> + * Redirect.DISCARD.file() the filename appropriate for the
> operating system &&
> + * Redirect.DISCARD.type() == Redirect.Type.WRITE &&
> + * Redirect.DISCARD.append() == false
> + * }</pre>
> + * @since 9
> + */
> + public static final Redirect DISCARD = new Redirect() {
>
> I think there will be confusion if the "null file" can be null.
More information about the core-libs-dev
mailing list