> On 12 May 2016, at 14:24, Sundararajan Athijegannathan 
> <sundararajan.athijegannat...@oracle.com> wrote:
> 
> Hi Paul:
> 
> On default package: with the new rule a VM anonymous class has to be
> either [1] in the same package as that of the host class or [2] in the
> unnamed package.

Yes.


> MethodHandleImpl's T class was earlier in
> java.lang.invoke package. So we can either fix it [1] to match the
> package of the host class every time [modify/regenerate class bytes for
> every host class or patch constant pool entries every time] or [2]
> generate in unnamed package and use it unmodified every time.


> The option
> [2] is being used because it involves no bytecode modification or
> constant pool patching.
> 

I realise that aspect [*].

Placing aside the technical details of generating anon classes, what i don’t 
understand are the implications of choosing the unnamed package over the host 
class package. Are there any such implications that we would favour using the 
unnamed package over the host class package?

Paul.

[*] And FWIW i reckon constant pool patching becomes easy when querying the 
class writer.

Reply via email to