RFR [9] 8150168: jconsole AboutDialog should use the JDK specific Version API
Chris Hegarty
chris.hegarty at oracle.com
Thu Feb 18 14:00:27 UTC 2016
On 18 Feb 2016, at 13:57, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> This looks okay but it's very possible this will need to change again soon once a home for the Version class is found.
Understood, but I am interested in breaking dependencies on sun.misc.Version,
so progress can be made on finding it a new home. Ultimately, these other areas
should use the new JDK specific Version API. It is a simple matter of a string
substitution later if jdk.Version is moved to a new home.
-Chris.
> -Alan
>
> On 18/02/2016 13:42, Chris Hegarty wrote:
>> With the introduction of a JDK specific Version API, the console AboutDialog
>> should no longer use sun.misc.Version. It should be be updated to use the
>> new JDK specific API.
>>
>> diff --git a/src/jdk.jconsole/share/classes/sun/tools/jconsole/AboutDialog.java b/src/jdk.jconsole/share/classes/sun/tools/jconsole/AboutDialog.java
>> --- a/src/jdk.jconsole/share/classes/sun/tools/jconsole/AboutDialog.java
>> +++ b/src/jdk.jconsole/share/classes/sun/tools/jconsole/AboutDialog.java
>> @@ -34,8 +34,6 @@
>> import javax.swing.border.*;
>> import javax.swing.event.*;
>> -import static sun.misc.Version.jdkMinorVersion;
>> -
>> import static java.awt.BorderLayout.*;
>> import static sun.tools.jconsole.Utilities.*;
>> @@ -183,7 +181,7 @@
>> }
>> private static String getOnlineDocUrl() {
>> - String version = Integer.toString(jdkMinorVersion());
>> + String version = Integer.toString(jdk.Version.current().major());
>> return Resources.format(Messages.HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL,
>> version);
>> }
>>
>> -Chris.
>>
>> https://bugs.openjdk.java.net/browse/JDK-8150168
>
More information about the serviceability-dev
mailing list