RFR 7199353: Allow ConstructorProperties annotation from any package
Jaroslav Bachorik
jaroslav.bachorik at oracle.com
Thu Oct 8 11:49:46 UTC 2015
Please, review the following change
Issue : https://bugs.openjdk.java.net/browse/JDK-7199353
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