[cdi-dev] AnnotationLiteral hashCode

Mark Struberg struberg at yahoo.de
Fri Mar 30 11:20:48 EDT 2012


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/enterprise/util/AnnotationLiteral.java

The important code parts:
    public int hashCode() {
        int hashCode = 0;
        for (Method member : getMembers()) {


but if there are no members...

LieGrue,
strub




More information about the cdi-dev mailing list