[cdi-dev] [JBoss JIRA] (CDI-514) FireEventTest#testDuplicateBindingsToFireEventFails() is wrong

Mark Struberg (JIRA) issues at jboss.org
Wed Mar 4 05:35:49 EST 2015


    [ https://issues.jboss.org/browse/CDI-514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046100#comment-13046100 ] 

Mark Struberg commented on CDI-514:
-----------------------------------

correctness? of what? This is currently preventing a perfectly valid use case. IF then it would need to be check for Qualifier equality (taking binding params into account).
But even if not - what happens if a user queries with n times the same qualifier? Nothing, nada, njente. There is just no impact! You will always get back the same Bean.

So it DOES break valid use cases and it DOES NOT prevent some broken cases -> totally useless, and we should fix this.

> FireEventTest#testDuplicateBindingsToFireEventFails() is wrong
> --------------------------------------------------------------
>
>                 Key: CDI-514
>                 URL: https://issues.jboss.org/browse/CDI-514
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>    Affects Versions: 1.2.Final
>            Reporter: Mark Struberg
>
> testDuplicateBindingsToFireEventFails() tests for 2 Lifted literals with different values. But this is perfectly fine as value is NOT annotated as @Nonbinding. Thus the 2 literals are NOT equals according to CDI rules. They are essentially 2 different annotations...
> Plz remove this test. It also makes no sense to add all those very performance costly tests at runtime. The worst case which can happen is that the 2 annotations make no sense. But they don't break anything. Wheras checking all the nasty conditions each and every time is really mad from a performance aspect. 



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the cdi-dev mailing list