[webbeans-issues] [JBoss JIRA] Commented: (WBRI-316) Binding annotations without runtime retention are erroneously accepted

David Allen (JIRA) jira-events at lists.jboss.org
Mon Jul 27 16:03:29 EDT 2009


    [ https://jira.jboss.org/jira/browse/WBRI-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12477798#action_12477798 ] 

David Allen commented on WBRI-316:
----------------------------------

The compiler may still retain the binding annotation regardless of what is specified by the @Retention annotation on the binding.  So if the annotation is lost at runtime, everything should be OK.  But in case the annotation is still available at runtime, the code needs to check that the binding type is valid (runtime retention).

> Binding annotations without runtime retention are erroneously accepted
> ----------------------------------------------------------------------
>
>                 Key: WBRI-316
>                 URL: https://jira.jboss.org/jira/browse/WBRI-316
>             Project: Web Beans
>          Issue Type: Bug
>    Affects Versions: 1.0.0.PREVIEW1
>            Reporter: David Allen
>            Assignee: Pete Muir
>             Fix For: 1.0.0.CR1
>
>
> The meta annotation store loads annotations with the @BindingType annotation without checking whether or not these bindings have runtime retention.
> This currently breaks the following tests:
> org.jboss.jsr299.tck.tests.event.EventTest::testEventBindingTypeNotRuntime()
> org.jboss.jsr299.tck.tests.event.bindingTypes.EventBindingTypesTest::testFireEventWithNonRuntimeBindingTypeFails()
> This bug was not detected until some older checks were removed from the BeanManager.fireEvent() method.  These checks are now done in another method which resolves the observers.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the weld-issues mailing list