RFR 7199353: Allow ConstructorProperties annotation from any package

Mandy Chung mandy.chung at oracle.com
Thu Oct 8 20:39:08 UTC 2015

On 10/08/2015 04:49 AM, Jaroslav Bachorik wrote:
> 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

I think #2 in the rules listed in "Reconstructing an instance of Java 
type J from a CompositeData" section needs some clarification/rewording.

#2 says if J has at least one public constructor with j.m. at CP....
- in fact J has at least one public constructor with either j.m. at CP or 
j.b. at CP....

I think it's more appropriate to mention j.m. at CP takes precedence in #2 
instead of adding the "For backward compatibility...." paragraph.

What about removing the new "For backward compatibility paragraph,...." 
and update #2 as something like this:

2. Otherwise, if /J/ has at least one public constructor with either 
j.m.CP or j.b.CP annotation, then one of those constructors.... be 
called to reconstruct an instance of /J/. If a constructor is annotated 
with both j.m.CP or j.b.CP, j.m.CP will be used and j.b.CP will be 
ignored.  <continue with the rest>

The existing tests are modified to use 
j.m.annotation.ConstructorProperties.  Can you remove java.desktop from 
@modules list if the test no longer depends on java.desktop.

The new package.html file: should use package-info.java instead.


More information about the jigsaw-dev mailing list