RFR: 8000975: (process) Merge UNIXProcess.java.bsd & UNIXProcess.java.linux (& .solaris & .aix)
Alan Bateman
Alan.Bateman at oracle.com
Wed Apr 2 15:15:50 UTC 2014
On 01/04/2014 18:04, Peter Levart wrote:
>
> Hi Roger,
>
> Well, it turns out the methods would like to stay in Os (renamed to
> Platform), but there is no need for per-enum-instance subclasses.
> Using enum constructor parameters and switch statements makes code
> even more compact and easy to follow...
>
> http://cr.openjdk.java.net/~plevart/jdk9-dev/UNIXProcess/webrev.04/
>
>
> I belive there is still room for consolidating logic in various
> Input/OutputStream wrappers used in UNIXProcess variants. But in the
> first round I tried to preserve the exact behaviour. If the wrapping
> of streams could be made more-or-less equal in all UNIX platforms,
> then the need for UNIXProcess subclasses and/or overhead of support
> classes included but not used goes away...
>
I went through webrev.05 and the new Platform enum looks reasonable to
me (and thanks for the rename too). I checked the os.name mapping and it
looks right. Whether it's Error or InternalError for an unrecognized
platform probably doesn't matter here.
If Roger is okay with this version then I think we should get this merge
done and look at other refactoring with a later change. Also if
src/solaris is renamed (and I know many of want do this) then it's
another opportunity to come back to the topic too.
-Alan.
More information about the core-libs-dev
mailing list