Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-22 Thread Naoto Sato
On Fri, 19 Jul 2024 14:47:09 GMT, Roger Riggs wrote: >> I think the test tool should not depend on the internal implementation, so I >> think it should be kept. > > Its still unnecessary, adds bulk and maintenance overhead that will go unused. I will leave it as is for now, as it is consistent

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-22 Thread Naoto Sato
On Thu, 18 Jul 2024 20:51:48 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-19 Thread Roger Riggs
On Thu, 18 Jul 2024 21:50:31 GMT, Naoto Sato wrote: >> The `ProcessTools` override is a delegating override; I think it still makes >> sense and should be kept. > > I think the test tool should not depend on the internal implementation, so I > think it should be kept. Its still unnecessary, ad

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-19 Thread Roger Riggs
On Thu, 18 Jul 2024 20:51:48 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-18 Thread Jaikiran Pai
On Thu, 18 Jul 2024 20:51:48 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-18 Thread Naoto Sato
On Thu, 18 Jul 2024 23:02:53 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/Process.java line 504: >> >>> 502: */ >>> 503: public boolean waitFor(Duration duration) throws >>> InterruptedException { >>> 504: Objects.requireNonNull(duration, "duration"); >> >>

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-18 Thread Pavel Rappo
On Thu, 18 Jul 2024 20:51:48 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-18 Thread Chen Liang
On Thu, 18 Jul 2024 22:57:59 GMT, Pavel Rappo wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> removed a blank line > > src/java.base/share/classes/java/lang/Process.java line 504: > >> 502: */ >> 503: publi

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-18 Thread Naoto Sato
On Thu, 18 Jul 2024 21:32:31 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/Process.java line 505: >> >>> 503: public boolean waitFor(Duration duration) throws >>> InterruptedException { >>> 504: Objects.requireNonNull(duration, "duration"); >>> 505: return

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-18 Thread Chen Liang
On Thu, 18 Jul 2024 21:27:35 GMT, Roger Riggs wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> removed a blank line > > src/java.base/share/classes/java/lang/Process.java line 505: > >> 503: public boolean waitFo

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-18 Thread Roger Riggs
On Thu, 18 Jul 2024 20:51:48 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v2]

2024-07-18 Thread Naoto Sato
On Thu, 18 Jul 2024 05:11:12 GMT, Jaikiran Pai wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> ProcessTools overriding one-arg waitFor() > > src/java.base/share/classes/java/lang/Process.java line 501: > >> 499:

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-18 Thread Chen Liang
On Wed, 17 Jul 2024 21:42:15 GMT, Naoto Sato wrote: >> This method needs to be overridden in  >> `test/lib/jdk/test/lib/process/ProcessTools.java` to call >> `ProcessTools.ProcessImpl::waitForStreams`. > > I don't think current `ProcessTools.startProcess()` even calls `waitFor(long, > TimeUnit)

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-18 Thread Chen Liang
On Thu, 18 Jul 2024 20:51:48 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-18 Thread Naoto Sato
> Proposing a new overload method for `Process#waitFor()` which takes a > `Duration` for the timeout value. This will reduce the possibility for making > mistakes with the `TimeUnit` in the other overload method. A corresponding > CSR has also been drafted. Naoto Sato has updated the pull reque

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v3]

2024-07-18 Thread Naoto Sato
On Thu, 18 Jul 2024 19:07:18 GMT, Roger Riggs wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Addressing review comments > > src/java.base/share/classes/java/lang/Process.java line 504: > >> 502: return

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v4]

2024-07-18 Thread Naoto Sato
> Proposing a new overload method for `Process#waitFor()` which takes a > `Duration` for the timeout value. This will reduce the possibility for making > mistakes with the `TimeUnit` in the other overload method. A corresponding > CSR has also been drafted. Naoto Sato has updated the pull reque

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v3]

2024-07-18 Thread Roger Riggs
On Thu, 18 Jul 2024 18:16:48 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v3]

2024-07-18 Thread Naoto Sato
> Proposing a new overload method for `Process#waitFor()` which takes a > `Duration` for the timeout value. This will reduce the possibility for making > mistakes with the `TimeUnit` in the other overload method. A corresponding > CSR has also been drafted. Naoto Sato has updated the pull reque

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v2]

2024-07-18 Thread Chen Liang
On Thu, 18 Jul 2024 06:22:25 GMT, Alan Bateman wrote: >> I am planning to add `@implSpec` with a separate issue: >> [JDK-8336679](https://bugs.openjdk.org/browse/JDK-8336679) > > Okay, just a bit strange to add waitFor(Duration) here and then follow-up > immediately to change it to move the tex

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v2]

2024-07-17 Thread Alan Bateman
On Wed, 17 Jul 2024 21:42:17 GMT, Naoto Sato wrote: >> It will be addressed by https://bugs.openjdk.org/browse/JDK-8336679 > > I am planning to add `@implSpec` with a separate issue: > [JDK-8336679](https://bugs.openjdk.org/browse/JDK-8336679) Okay, just a bit strange to add waitFor(Duration) h

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v2]

2024-07-17 Thread Jaikiran Pai
On Wed, 17 Jul 2024 21:41:16 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v2]

2024-07-17 Thread Jaikiran Pai
On Wed, 17 Jul 2024 21:41:16 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v2]

2024-07-17 Thread Jaikiran Pai
On Wed, 17 Jul 2024 21:41:16 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v2]

2024-07-17 Thread Naoto Sato
On Wed, 17 Jul 2024 20:00:18 GMT, ExE Boss wrote: >>> waitFor can be overridden by pre-24 subclasses to provide a better >>> implementation while ... >> >> It doesn't really make sense to extend Process, except maybe for mocking or >> other testing. Process is really for JDK implementations, i

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v2]

2024-07-17 Thread Naoto Sato
On Wed, 17 Jul 2024 21:39:39 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/Process.java line 481: >> >>> 479: * this method returns immediately with the value {@code false}. >>> 480: * >>> 481: * The default implementation of this method polls the {@code >>> exi

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v2]

2024-07-17 Thread Chen Liang
On Wed, 17 Jul 2024 18:28:10 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> ProcessTools overriding one-arg waitFor() > > src/java.base/share/classes/java/lang/Process.java line 481: > >> 479:

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v2]

2024-07-17 Thread Naoto Sato
> Proposing a new overload method for `Process#waitFor()` which takes a > `Duration` for the timeout value. This will reduce the possibility for making > mistakes with the `TimeUnit` in the other overload method. A corresponding > CSR has also been drafted. Naoto Sato has updated the pull reque

Re: RFR: 8336479: Provide Process.waitFor(Duration)

2024-07-17 Thread ExE Boss
On Wed, 17 Jul 2024 18:31:32 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/lang/Process.java line 504: >> >>> 502: return false; >>> 503: >>> 504: return waitForNanos(TimeUnit.NANOSECONDS.convert(duration)); >> >> `waitFor` can be overridden by pre-24 subclas

Re: RFR: 8336479: Provide Process.waitFor(Duration)

2024-07-17 Thread Alan Bateman
On Wed, 17 Jul 2024 17:51:52 GMT, Chen Liang wrote: > waitFor can be overridden by pre-24 subclasses to provide a better > implementation while ... It doesn't really make sense to extend Process, except maybe for mocking or other testing. Process is really for JDK implementations, it's just hi

Re: RFR: 8336479: Provide Process.waitFor(Duration)

2024-07-17 Thread Alan Bateman
On Wed, 17 Jul 2024 17:36:29 GMT, Naoto Sato wrote: > Proposing a new overload method for `Process#waitFor()` which takes a > `Duration` for the timeout value. This will reduce the possibility for making > mistakes with the `TimeUnit` in the other overload method. A corresponding > CSR has als

Re: RFR: 8336479: Provide Process.waitFor(Duration)

2024-07-17 Thread Chen Liang
On Wed, 17 Jul 2024 17:36:29 GMT, Naoto Sato wrote: > Proposing a new overload method for `Process#waitFor()` which takes a > `Duration` for the timeout value. This will reduce the possibility for making > mistakes with the `TimeUnit` in the other overload method. A corresponding > CSR has als

RFR: 8336479: Provide Process.waitFor(Duration)

2024-07-17 Thread Naoto Sato
Proposing a new overload method for `Process#waitFor()` which takes a `Duration` for the timeout value. This will reduce the possibility for making mistakes with the `TimeUnit` in the other overload method. A corresponding CSR has also been drafted. - Commit messages: - initial co