RFR: 8155939: sun.launcher.LauncherHelper INSTANCE is unused

Claes Redestad claes.redestad at oracle.com
Tue May 3 15:00:00 UTC 2016


Thanks Roger!

/Claes

On 2016-05-03 16:56, Roger Riggs wrote:
> Looks fine, Roger
>
>
> On 5/3/2016 10:46 AM, Claes Redestad wrote:
>> Hi,
>>
>> sun.launcher.LauncherHelper is currently a singleton enum class, but 
>> the INSTANCE is never used. With encapsulation in place we shouldn't 
>> worry about cleaning this up.
>>
>> jdeps data show no usage of this helper class outside of the JDK.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8155939
>>
>> Patch:
>> diff -r 930d3aef37ee 
>> src/java.base/share/classes/sun/launcher/LauncherHelper.java
>> --- a/src/java.base/share/classes/sun/launcher/LauncherHelper.java 
>> Tue May 03 15:50:54 2016 +0200
>> +++ b/src/java.base/share/classes/sun/launcher/LauncherHelper.java 
>> Tue May 03 16:23:26 2016 +0200
>> @@ -84,8 +84,10 @@
>>  import jdk.internal.misc.VM;
>>
>>
>> -public enum LauncherHelper {
>> -    INSTANCE;
>> +public final class LauncherHelper {
>> +
>> +    // No instantiation
>> +    private LauncherHelper() {}
>>
>>      // used to identify JavaFX applications
>>      private static final String JAVAFX_APPLICATION_MARKER =
>>
>> Thanks!
>>
>> /Claes
>




More information about the core-libs-dev mailing list