mx4j/src/core/javax/management/openmbean TabularType.java,1.15,1.16
Simone Bordet <[email protected]> Sun, 10 Oct 2004 16:39:43 +0000
| Newsgroups | gmane.comp.java.mx4j.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mx4j/mx4j/src/core/javax/management/openmbean
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25772/src/core/javax/management/openmbean
Modified Files:
TabularType.java
Log Message:
Fixed implementation of hashCode() following the spec, and cleaned up the test case
Index: TabularType.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/javax/management/openmbean/TabularType.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** TabularType.java 7 Sep 2004 13:03:08 -0000 1.15
--- TabularType.java 10 Oct 2004 16:39:41 -0000 1.16
***************
*** 95,104 ****
{
int result = getTypeName().hashCode();
! result += 13 * getRowType().hashCode();
List names = getIndexNames();
for (int i = 0; i < names.size(); ++i)
{
Object name = names.get(i);
! result += 23 * name.hashCode();
}
m_hashcode = result;
--- 95,104 ----
{
int result = getTypeName().hashCode();
! result += getRowType().hashCode();
List names = getIndexNames();
for (int i = 0; i < names.size(); ++i)
{
Object name = names.get(i);
! result += name.hashCode();
}
m_hashcode = result;
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl