RFR 7199353: Allow ConstructorProperties annotation from any package

Alan Bateman Alan.Bateman at oracle.com
Fri Oct 9 12:03:23 UTC 2015


On 09/10/2015 12:42, Peter Levart wrote:
> Hi,
>
> I don't think it has been mentioned before, but is 
> @ConstructorProperties still necessary in JDK8+ ? Couldn't the 
> j.l.r.Constructor#getParameters() be used instead?
>
> How is one supposed to compile an MXBean that would work in JDK8 and 
> at the same time in JDK9+ without java.desktop in the module graph?
>
Using the method parameters has come up a few times in the context of 
JMX. Jaroslav is best to talk to that.

But just to say that the issue here isn't specific to JDK 9+, it's also 
an issue with subset Profiles of Java SE 8 too. It's really just a 
mismatch between the compile-time and run-time environment, a mismatch 
that is sometimes hard to diagnose because the annotation is ignored 
when its type doesn't exist at run-time.

-Alan.




More information about the jigsaw-dev mailing list