Skip to content

Commit 6720d75

Browse files
dreab8sebersole
authored andcommitted
Fix BasicHibernateAnnotationsTest
1 parent 538d7eb commit 6720d75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hibernate-core/src/test/java/org/hibernate/test/annotations/entity/BasicHibernateAnnotationsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
package org.hibernate.test.annotations.entity;
88

9+
import javax.persistence.OptimisticLockException;
910
import java.math.BigDecimal;
1011
import java.util.Currency;
1112
import java.util.Date;
@@ -16,7 +17,6 @@
1617

1718
import org.hibernate.AnnotationException;
1819
import org.hibernate.Hibernate;
19-
import org.hibernate.HibernateException;
2020
import org.hibernate.Query;
2121
import org.hibernate.Session;
2222
import org.hibernate.SessionFactory;
@@ -116,7 +116,7 @@ public void testVersioning() throws Exception {
116116
parallelTx.commit();
117117
fail( "All optimistic locking should have make it fail" );
118118
}
119-
catch (HibernateException e) {
119+
catch (OptimisticLockException e) {
120120
if ( parallelTx != null ) parallelTx.rollback();
121121
}
122122
finally {

0 commit comments

Comments
 (0)