hash collisions in AW ClassInfo
-------------------------------

                 Key: CDV-891
                 URL: https://jira.terracotta.org/jira//browse/CDV-891
             Project: Community Development
          Issue Type: Bug
            Reporter: Tim Eck
            Assignee: Issue Review Board


The various ClassInfo implementations in our version of aspectwerkz don't seem 
to handle certain field signatures well. 

My understanding of the AW internals is that a unique hash is generated to 
represent particular fields in classes. The algorithm for generating the hash 
usually produces unique values, but not always. Specifically if within a 
particular class, if you have two (or more) fields of the same type *AND* the 
hashcode() value for the String names of the fields happen to be equal, you'll 
get a collision.

For example, this class should illustrate the problem:
class Foo {
   Object AV;
   Object B7;
}

Obtiaining the ClassInfo (asm or java) for this class, and then iterating the 
fields will give two fields both named B7. The generated field hash will be the 
same since both are of same type ("Ljava/lang/Object;) and the hashcode of "AV" 
is equals to the hashcode of "B7"



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

        
_______________________________________________
tc-dev mailing list
tc-dev@lists.terracotta.org
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to