Re: RFR: 8278422: Replace use of deprecated single string variant of Runtime.exec method

2023-05-10 Thread Lukasz Kostyra
On Tue, 9 May 2023 21:15:38 GMT, Andy Goryachev wrote: >> But I do think it would be a good idea to use `PlatformUtil` here, so maybe >> file a cleanup issue to look for places where we explicitly parse `os.name`, >> and consider calling the appropriate `PlatformUtil` method instead? > > +1 for

Re: RFR: 8278422: Replace use of deprecated single string variant of Runtime.exec method

2023-05-09 Thread Kevin Rushforth
On Tue, 9 May 2023 14:12:09 GMT, Lukasz Kostyra wrote: > Calls of `Runtime.getRuntime().exec()` were changed to `String[]` variant. > > Only Windows and macOS parts were affected, tests work good on both platforms. > > I looked through the code and didn't find any other cases of > `Runtime.get

Re: RFR: 8278422: Replace use of deprecated single string variant of Runtime.exec method

2023-05-09 Thread Andy Goryachev
On Tue, 9 May 2023 20:22:05 GMT, Kevin Rushforth wrote: >> No, we can't use that. More to the point, it is unrelated to this PR (and >> thus out of scope). > > But I do think it would be a good idea to use `PlatformUtil` here, so maybe > file a cleanup issue to look for places where we explicit

Re: RFR: 8278422: Replace use of deprecated single string variant of Runtime.exec method

2023-05-09 Thread Kevin Rushforth
On Tue, 9 May 2023 20:19:50 GMT, Kevin Rushforth wrote: >> you are right, wrong PR, sorry >> https://github.com/openjdk/jdk/pull/12931 > > No, we can't use that. More to the point, it is unrelated to this PR (and > thus out of scope). But I do think it would be a good idea to use `PlatformUtil`

Re: RFR: 8278422: Replace use of deprecated single string variant of Runtime.exec method

2023-05-09 Thread Kevin Rushforth
On Tue, 9 May 2023 18:37:24 GMT, Andy Goryachev wrote: >>> There was a recent PR >>> [openjdk/jdk#13357](https://github.com/openjdk/jdk/pull/13357) adding an >>> enum deep in the jdk bowels >>> >>> we probably can't use that >> >> Isn't that for the architecture, not the OS? > > you are right

Re: RFR: 8278422: Replace use of deprecated single string variant of Runtime.exec method

2023-05-09 Thread Andy Goryachev
On Tue, 9 May 2023 18:30:56 GMT, Nir Lisker wrote: >> There was a recent PR >> https://github.com/openjdk/jdk/pull/13357 >> adding an enum deep in the jdk bowels >> >> we probably can't use that > >> There was a recent PR >> [openjdk/jdk#13357](https://github.com/openjdk/jdk/pull/13357) adding

Re: RFR: 8278422: Replace use of deprecated single string variant of Runtime.exec method

2023-05-09 Thread Nir Lisker
On Tue, 9 May 2023 18:26:02 GMT, Andy Goryachev wrote: >> Don't think we have an enum (maybe we should), but `PlatformUtil` already >> takes care of identifying the OS, also using >> `System.getProperty("os.name")`. You can use `PlatformUtil.isMac()`. If we >> make an enum, that's where is sho

Re: RFR: 8278422: Replace use of deprecated single string variant of Runtime.exec method

2023-05-09 Thread Nir Lisker
On Tue, 9 May 2023 17:54:35 GMT, Andy Goryachev wrote: >> Calls of `Runtime.getRuntime().exec()` were changed to `String[]` variant. >> >> Only Windows and macOS parts were affected, tests work good on both >> platforms. >> >> I looked through the code and didn't find any other cases of >> `R

Re: RFR: 8278422: Replace use of deprecated single string variant of Runtime.exec method

2023-05-09 Thread Andy Goryachev
On Tue, 9 May 2023 18:23:15 GMT, Nir Lisker wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/application/HostServicesDelegate.java >> line 138: >> >>> 136: try { >>> 137: if (osName.startsWith("Mac OS")) { >>> 138: Runtime.getRuntime

Re: RFR: 8278422: Replace use of deprecated single string variant of Runtime.exec method

2023-05-09 Thread Andy Goryachev
On Tue, 9 May 2023 14:12:09 GMT, Lukasz Kostyra wrote: > Calls of `Runtime.getRuntime().exec()` were changed to `String[]` variant. > > Only Windows and macOS parts were affected, tests work good on both platforms. > > I looked through the code and didn't find any other cases of > `Runtime.get

RFR: 8278422: Replace use of deprecated single string variant of Runtime.exec method

2023-05-09 Thread Lukasz Kostyra
Calls of `Runtime.getRuntime().exec()` were changed to `String[]` variant. Only Windows and macOS parts were affected, tests work good on both platforms. I looked through the code and didn't find any other cases of `Runtime.getRuntime().exec(String)` being used, so that should cover all possibl