On Thu, 27 Apr 2023 04:59:00 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Leonid Mesnik has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   fix
>
> test/lib-test/jdk/test/lib/process/ProcessToolsStartProcessTest.java line 79:
> 
>> 77:                 System.out.print("FAILED: wrong number of lines in 
>> Consumer output\n");
>> 78:                 success = false;
>> 79:                 System.out.print(out.getStdout());
> 
> Why isn't this printing output?

fixed.

> test/lib-test/jdk/test/lib/process/ProcessToolsStartProcessTest.java line 95:
> 
>> 93:     public static void main(String[] args) throws Exception {
>> 94:         if (args.length > 0) {
>> 95:             for (int i = 0; i < Integer.parseInt(args[0]); i++) {
> 
> This will call parseInt on each iteration of the loop.

fixed.

> test/lib/jdk/test/lib/process/ProcessTools.java line 183:
> 
>> 181:                         // It is needed to wait until stream is flushed 
>> after
>> 182:                         // process is completed.
>> 183:                         task.get();
> 
> This looks problematic - if you block here you are holding the object monitor 
> as this is a synchronized method.

You are right. It is needed to give a chance to write to this buffer. fixed.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13683#discussion_r1178707275
PR Review Comment: https://git.openjdk.org/jdk/pull/13683#discussion_r1178707373
PR Review Comment: https://git.openjdk.org/jdk/pull/13683#discussion_r1178708269

Reply via email to