Ok, this sucks but it's ok :)
To be more specific: if you do
public @Default MyBean {}
and MyBean.class.getAnnoations() then this Default Annotation also returns hashCode 0 :(
Thus it's ok that our AnnotationLiteral also returns 0.
LieGrue,
strub
----- Original Message -----
From: Mark Struberg <struberg(a)yahoo.de>
To: cdi-dev <cdi-dev(a)lists.jboss.org>
Cc:
Sent: Friday, March 30, 2012 5:20 PM
Subject: [cdi-dev] AnnotationLiteral hashCode
Hi!
Today I figured that any AnnotationLiteral of an Annoation without values always
returns 0.
I guess this is a bug in the api, isn't?
https://github.com/pmuir/cdi/blob/master/api/src/main/java/javax/enterpri...
The important code parts:
public int hashCode() {
int hashCode = 0;
for (Method member : getMembers()) {
but if there are no members...
LieGrue,
strub
_______________________________________________
cdi-dev mailing list
cdi-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev