RFR: 8202583: Remove experimental ClassForNamePlugin

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8202583: Remove experimental ClassForNamePlugin

Claes Redestad
Hi,

the --class-for-name jlink plugin was added as an experiment to test and
evolve the jlink plugin infrastructure. The actual effect of enabling
this plugin on standard images is very limited (only a handful of
Class.forName:s are replaced) and turns out it can be a breaking change
since replacing a Class.forName isn't semantically identical with an ldc
of the class (the latter won't trigger class initialization).

Thus, since this plugin isn't very profitable and potentially dangerous,
I suggest removing it: http://cr.openjdk.java.net/~redestad/8202583/open.00/

An open question is whether a CSR is required to remove this.

Thanks!

/Claes


Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8202583: Remove experimental ClassForNamePlugin

Jim Laskey (Oracle)
+1


> On May 7, 2018, at 10:23 AM, Claes Redestad <[hidden email]> wrote:
>
> Hi,
>
> the --class-for-name jlink plugin was added as an experiment to test and evolve the jlink plugin infrastructure. The actual effect of enabling this plugin on standard images is very limited (only a handful of Class.forName:s are replaced) and turns out it can be a breaking change since replacing a Class.forName isn't semantically identical with an ldc of the class (the latter won't trigger class initialization).
>
> Thus, since this plugin isn't very profitable and potentially dangerous, I suggest removing it: http://cr.openjdk.java.net/~redestad/8202583/open.00/
>
> An open question is whether a CSR is required to remove this.
>
> Thanks!
>
> /Claes
>
>

Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8202583: Remove experimental ClassForNamePlugin

Alan Bateman
In reply to this post by Claes Redestad
On 07/05/2018 14:23, Claes Redestad wrote:

> Hi,
>
> the --class-for-name jlink plugin was added as an experiment to test
> and evolve the jlink plugin infrastructure. The actual effect of
> enabling this plugin on standard images is very limited (only a
> handful of Class.forName:s are replaced) and turns out it can be a
> breaking change since replacing a Class.forName isn't semantically
> identical with an ldc of the class (the latter won't trigger class
> initialization).
>
> Thus, since this plugin isn't very profitable and potentially
> dangerous, I suggest removing it:
> http://cr.openjdk.java.net/~redestad/8202583/open.00/
The changes looks fine.

>
> An open question is whether a CSR is required to remove this.
It's an experimental/undocumented/unsupported plugin so just removing it
should be fine (the original CSR equivalent that added jlink didn't not
mention this plugin).

-Alan
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8202583: Remove experimental ClassForNamePlugin

Mandy Chung
In reply to this post by Claes Redestad


On 5/7/18 6:23 AM, Claes Redestad wrote:

> Hi,
>
> the --class-for-name jlink plugin was added as an experiment to test
> and evolve the jlink plugin infrastructure. The actual effect of
> enabling this plugin on standard images is very limited (only a
> handful of Class.forName:s are replaced) and turns out it can be a
> breaking change since replacing a Class.forName isn't semantically
> identical with an ldc of the class (the latter won't trigger class
> initialization).
>
> Thus, since this plugin isn't very profitable and potentially
> dangerous, I suggest removing it:
> http://cr.openjdk.java.net/~redestad/8202583/open.00/
>

+1

> An open question is whether a CSR is required to remove this.

This is an experimental and unsupported plugin.  I agree with Alan that
no CSR is needed for this change.

Mandy