Review request for 7034570 - java.lang.Runtime.exec(String[] cmd, String[] env) can not work properly if SystemRoot not inherited
David Schlosnagle
schlosna at gmail.com
Sat Apr 16 14:45:37 UTC 2011
On Sat, Apr 16, 2011 at 6:48 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> Michael McMahon wrote:
>>
>> I have incorporated much of Ulf's approach into this version.
>>
>> I agree with Alan about the spec. We could find other variables in the
>> future that need
>> to be set, but can have alternative values other than the default. I think
>> this approach
>> is the most flexible.
>>
>> http://cr.openjdk.java.net/~michaelm/7034570/webrev.4/
>
> This looks much better - thanks Ulf for the improved loop and changing it to
> use nameComparator. It will be good to get this one fixed.
One minor nit in ProcessEnvironment.java
336 private static void addToEnv(StringBuilder sb, String name,
String val) {
337 sb.append(name+"="+val+'\u0000');
338 }
I think it should be as follows to avoid implicitly constructing
another StringBuilder and the extra copying overhead;
336 private static void addToEnv(StringBuilder sb, String name,
String val) {
337 sb.append(name).append('=').append(val).append('\u0000');
338 }
- Dave
More information about the core-libs-dev
mailing list