[ https://issues.apache.org/jira/browse/OWB-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916036#action_12916036 ]
Gurkan Erdogdu commented on OWB-462: ------------------------------------ thanks Jakob, I will look your patch. > Refactor AnnotationUtil.hasAnnotationMember() > --------------------------------------------- > > Key: OWB-462 > URL: https://issues.apache.org/jira/browse/OWB-462 > Project: OpenWebBeans > Issue Type: Task > Components: Core > Affects Versions: 1.0.0-alpha-2 > Reporter: Jakob Korherr > Assignee: Gurkan Erdogdu > Attachments: OWB-462.patch > > > We needed a method to compare qualifiers for MyFaces CODI and stumbled upon > AnnotationUtil.hasAnnotationMember(). > However this method is really messy, because it uses the String > representation of an annotation to compare it and thus fails in various cases > (e.g. when using annotation instances which implement toString() differently > or by using array values in the qualifier). Furthermore it does not detect > @Nonbinding fields correctly, if there is more than one annotation on the > annotation-method. > Also it's kinda weird that the method takes the Annotation-Class as an extra > parameter, but it could just get it from one of the Annotation instances. I > checked all usages and found out that this argument can be dropped. In > addition I think it's better to rename the method to isQualifierEqual() - the > usage is just a lot clearer. > I implemented a custom solution for MyFaces CODI and I think it should also > be applied here. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.