sun/awt/OSInfo.java
Alan Bateman
Alan.Bateman at oracle.com
Mon Jun 24 10:52:45 UTC 2013
On 24/06/2013 09:23, Weijun Wang wrote:
> I don't meant to add any API for external users, but even JDK itself
> needs some helper classes, and looks like sun.misc is the place.
>
> In this case, there are too many places inside JDK that checks what
> the current OS is. Some uses startsWith and some contains, some
> toLowerCase and some toUppreCase, some might not be complete (no OS
> X?). It will be nice if we have a safe and consistent way. It could
> even cover the PropertyPermission needed.
I agree we need to be consistent in the JDK. It might be interesting to
look at the various usages to see whether they are really justified,
maybe some of these usages are hints that the code in question needs to
be refactored into platform specific code? Maybe this is just a reminder
that src/solaris/classes needs an overhaul?
There is a lot of things in sun.misc that should be moved or removed but
going anything seems to break things outside of the JDK. In recent
times, we've started to put things into jdk.internal (I think of it as
the "new" sun.misc).
-Alan.
More information about the core-libs-dev
mailing list