[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2482) Equals method missing in CharArrayType

Unnikrishnan.k.v (JIRA) noreply at atlassian.com
Fri Mar 9 12:49:14 EST 2007


Equals method missing in CharArrayType
--------------------------------------

         Key: HHH-2482
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2482
     Project: Hibernate3
        Type: Bug

  Components: core  
    Versions: 3.2.2    
 Environment: hibernate-3.2.2.ga, JavaDB
    Reporter: Unnikrishnan.k.v


I am working on a Hibernate entity which contains a char[] field to store password.

   public class Contact implements java.io.Serializable {
       
            private String userName;
      
            private char[] password;

            private Integer version;
   }


Now the problem that I am observing is, version is getting incremented even when none of the fields are changed.
Hibernate log showed that  *password* field is getting dirty.  But, on doing single step debug I  found  that  hibernate  is using
EqualsHelper.equals() method to compare two arrays. This results in  wrong result.  I think, the correct implementation should be
to add an equals method in CharArrayType.java.

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




More information about the hibernate-issues mailing list