[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-1646) Bad code in FastClass.equals

Scott Marlow (JIRA) noreply at atlassian.com
Thu Dec 14 10:09:04 EST 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1646?page=all ]
     
Scott Marlow resolved HHH-1646:
-------------------------------

    Resolution: Fixed

I ran ./build.sh junitreport with and without the patch.  The patch doesn't cause impact the success or failures of any current tests.  Its not clear to me if the FastClass.exist is exposed to client code, but lets apply the fix anyway.

Fix checked into trunk revision 10993.

> Bad code in FastClass.equals
> ----------------------------
>
>          Key: HHH-1646
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1646
>      Project: Hibernate3
>         Type: Bug

>     Versions: 3.1.3, 3.2.0 cr1
>  Environment: 3.2.0
>     Reporter: Niels Harremoës
>     Assignee: Scott Marlow
>     Priority: Blocker
>      Fix For: 3.2.2
>  Attachments: FastClass.patch
>
> Original Estimate: 30 minutes
>         Remaining: 30 minutes
>
> In FastClass, the equals method is:
>   public boolean equals(Object o) {
>     if ( o == null || ( o instanceof FastClass ) ) {
>       return false;
>     }
>     return this.type.equals( ( ( FastClass ) o ).type );
> }
> There's a missing ! - the first line should be 
>  if ( o == null ||  !  ( o instanceof FastClass ) ) {

-- 
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