RFR 7199353: Allow ConstructorProperties annotation from any package
Jaroslav Bachorik
jaroslav.bachorik at oracle.com
Wed Oct 14 09:34:23 UTC 2015
On 8.10.2015 13:49, Jaroslav Bachorik wrote:
> Please, review the following change
>
> Issue : https://bugs.openjdk.java.net/browse/JDK-7199353
Round 2 webrev: http://cr.openjdk.java.net/~jbachorik/7199353/webrev.01
Changes against round 1:
* @javax.management.ConstructorProperties (was
@javax.management.annotation.ConstructorProperties)
* diff is against the current jdk9 (eg. not the jigsaw repo)
* removed warning when @j.b.ConstructorProperties is used
* changed the wording in the reconstruction rules in @MXBean as recommended
* changed the issue synopsis as recommended
JDK JMX tests are still passing completely.
Thanks,
-JB-
> Webrev: http://cr.openjdk.java.net/~jbachorik/7199353/webrev.00/top
> http://cr.openjdk.java.net/~jbachorik/7199353/webrev.00/jdk
>
> Issue description:
> "MXBean currently supports model-specific types annotated with
> java.beans.ConstructorProperties that is tightly coupled with
> the client API. A MXBean developer will likely want to avoid
> using java.beans.ConstructorProperties if it ends up in the
> desktop module that their code doesn't want to pull in. In
> that case, the code has to write to achieve the same effort
> by defining the from(CompositeData) method."
>
> This patch adds a new annotation
> @javax.management.annotation.ConstructorProperties which can be used in
> stead of @java.beans.ConstructorProperties. This will allow the
> developers to use this convenience feature without introducing a bit
> strange dependency on java.desktop.
>
> For the backward compatibility purposes
> @java.beans.ConstructorProperties annotation will still be recognized by
> the JMX system but
> a) A warning will be logged about using a deprecated way to specify
> @ConstructorProperties
> b) If there is also @javax.management.annotation.ConstructorProperties
> annotation present on the same constructor then only this annotation
> will be considered.
>
> All the tests exercising the JMX related @ConstructorProperties
> functionality have been updated to use
> @javax.management.annotation.ConstructorProperties.
>
> Since this change is affecting public APIs the relevant CCC request has
> been filed and is in processing now.
>
>
> Thanks,
>
> -JB-
More information about the jigsaw-dev
mailing list