[hibernate-issues] [Hibernate-JIRA] Commented: (HV-531) hibernate-validator-annotation-processor tests fails when running against JDK7

Kevin Pollet (JIRA) noreply at atlassian.com
Fri Nov 25 05:34:19 EST 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HV-531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44424#comment-44424 ] 

Kevin Pollet commented on HV-531:
---------------------------------

I think it will work. If the AP returns {{SourceVersion.latestSupported()}} it will be usable with Java 5/6/7 source versions and the AP can be used with JDK 7 even if it's built with JDK 6 (on Java 7 you can run Java 6 code).

>From Oracle blog:

{quote}
Have a policy for future language versions: The JSR 269 API models the current language, but the language will be changing in some future release and annotation processors written today could be run against new language constructs of the future. 

Two basic policies are:
- Write the processor to only work with the current language version.
- Write the processor to cope with unknown future constructs.

The sample processor does the latter. It does this by returning SourceVersion.latest rather than a particular version constant and by having the visitor's visitUnknown method be non-fatal if called. The visitUnknown method will be called when encountering a construct newer than the platform version the visitor was written to.
{quote}

> hibernate-validator-annotation-processor tests fails when running against JDK7
> ------------------------------------------------------------------------------
>
>                 Key: HV-531
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-531
>             Project: Hibernate Validator
>          Issue Type: Bug
>          Components: annotation-processor, tests
>    Affects Versions: 4.2.0.Final
>            Reporter: Hardy Ferentschik
>             Fix For: 4.3.0.next
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list