[OpenJDK 2D-Dev] Review Request: JDK-8000406 - change files using @GenerateNativeHeader to use @Native
Alan.Bateman at oracle.com
Tue Apr 2 08:12:49 UTC 2013
On 01/04/2013 23:16, Dan Xu wrote:
> Hi All,
> In this fix, I have updated files in JDK libraries to use @Native
> annotation instead of @GenerateNativeHeader to mark classes that
> contain no native methods but constants used by native codes.
> @GenerateNativeHeader was added earlier in the development for
> JDK8."This has proved problematic for some core classes with respect
> to Jigsaw, since the use of such an annotation creates a compile-time
> dependency from the base module to the module containing javax.tools,
> and the base module should not have any dependencies." After switching
> to @Native annotation, the dependency problem will be solved as
> java.lang.annotation.Native is in the proposed base module. In
> addition, the annotation has been refined not to be on the class level
> but on the constants themselves, which also makes the generated header
> files much cleaner.
> This effort is part of JDK-8000404. After jdk libraries uptaking the
> annotation changes, @GenerateNativeHeader annotation will be removed
> CCC: http://ccc.us.oracle.com/8000404
> webrev: http://cr.openjdk.java.net/~dxu/8000406/webrev/
> Thanks for your feedback!
This is great work - thank you for doing this.
As the majority of the changed code is in the 2d/awt/client area then I
hope that you will get timely reviews from those areas. The main thing
with a change like this is that the changes build on all platforms and
I've know you've verified that.
I skimmed through the webrev and don't see anything obviously wrong. I
focused mostly on the non-client code and they all look right. It's
interesting that @GenerateNativeHeader was added to several classes with
native methods, I don't know why that was the case. I was also unaware
that we had Haskell code in the build.
So thumbs up from me. I assume you or Jon will remove
GenerateNativeHeader from the langtools repository once your changes are
More information about the 2d-dev