[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-enhanced-metadata-spec
Subject:    Re: some more fiddling
From:       Joe Darcy <joe.darcy () oracle ! com>
Date:       2013-01-24 22:14:45
Message-ID: 5101B255.4060904 () oracle ! com
[Download RAW message or body]

Hi Mike,

On 1/24/2013 1:16 PM, michael keith wrote:
> So I did some playing around with b72 in a couple of ways.
>
> First, I went and modified all of the current JPA container 
> annotations to be JDK 8 repeatable (using @ContainerFor and 
> @ContainedBy, since @Repeatable did not seem to be included) and 
> compiled it using b72. 

The transition to the simplified @Repeatable model is happening in 
stages.  Build 73 of JDK 8 has the Repeatable type,  but no compiler and 
reflection support.   The compiler support is in the team repository now 
(bug 8006119) and should appear in a near-future promoted build.  
However, the core reflection changes to revert back to the JDK 7 and 
earlier behavior are not implemented yet.

> Then I took the JPA RI (EclipseLink) code and its existing JPA tests 
> and built them using JDK 1.7_11. I then ran the tests using b72 and 
> found that all of the tests passed, so basically existing code and 
> test cases compiled using a previous JDK will continue to work (at 
> least in the test cases that I ran). So the first "do no harm" test 
> seems to have passed :-)

Good to hear :-)

>
> The next thing I did was up the ante and move on to creating tests 
> using new features (e.g. repeating annotations) to see how compatible 
> the code would be. In other words, I wanted to make sure the same 
> processing code could handle repeating annotations using the old API. 
> It turned out not to work, though, so either the compatibility layer 
> that we discussed before Christmas isn't done yet, or the current 
> support just doesn't work as expected. For example, invoking 
> getAnnotation(Foo.class) on both
>
> @Foo(1) @Foo(2)
> class A {}
>
> and
>
> @FooContainer({@Foo(1), @Foo(2)})
> class A {}
>
> both returned @Foo(1). In both of these cases it should have returned 
> null.
>
> This, combined with the fact that the Repeatable annotation was not 
> shipped in b72 leads me to believe that the compatibility support is 
> still forthcoming. Do you folks have any estimates for when it will be 
> ready to try out?
>

The core reflection changes should be in a promoted build within a few 
weeks.

Thanks,

-Joe

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic