Hi,

(Posting this on the list at the request of Rory O'Donnell)

This morning I tried to upgrade our Hibernate Validator build and came
across this issue:
https://bugs.openjdk.java.net/browse/JDK-8173604 .

As a lot of projects experimenting with the Early access builds of the JDK
9, we added --add-modules java.annotations.common to our build options.

This doesn't work anymore as the Java SE JSR 250 annotations (@Generated,
@PreDestroy, @PostConstruct, @Resource...) that were previously in a module
called java.annotations.common were moved to a module called
java.xml.ws.annotation as part of the aforementioned issue.

The fix is easy, I just have to change my --add-modules directive but I
started to wonder if there's some sort of misunderstanding here.

As far as I understand it, these annotations are supposed to be common
annotations available in the JDK (see JSR 250: Common Annotations for the
JavaTM Platform). Some are used by a lot of projects out there: nearly
every project based on generated code requires the @Generated annotation to
be present as most tools generating code use it.

I don't know why these annotations were hosted in the jaxws part of the
source code to begin with but I don't think we can limit them to this usage.

At the end, I'm wondering if these classes shouldn't be part of the default
set of classes exposed without requiring an --add-modules option.

Thanks for your feedback.

-- 
Guillaume

Reply via email to