[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-2397) hilo generator can generate negative numbers because of arithmetic overflow

Steve Ebersole (JIRA) noreply at atlassian.com
Tue Mar 20 10:37:08 EDT 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2397?page=all ]
     
Steve Ebersole closed HHH-2397:
-------------------------------

    Resolution: Fixed

trunk / 3.2

highly recommend the new enhanced generators moving forward...

> hilo generator can generate negative numbers because of arithmetic overflow
> ---------------------------------------------------------------------------
>
>          Key: HHH-2397
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2397
>      Project: Hibernate3
>         Type: Bug

>   Components: core
>     Reporter: Steve Ebersole
>     Assignee: Steve Ebersole
>      Fix For: 3.2.3

>
>
> org.hibernate.id.TableHiLoGenerator#generate can potentially generate negative numbers because of the possibility of overflow due to the handling of the "clock over" multiplication using int multiplication.  The solution is to force one of the operands to type long.

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