KamoCRM

Catch OptimisticLockException, the type 40001 actually wraps as

FixMediaService
Shipped
7 ஆகஸ்ட், 2026 அன்று 7:41 AM UTC
Author
Kamo
Commit
57212bb

Round 3 review fix: hibernate-core's **************** tests LockAcquisitionException (what SQLState 40001 converts to) against four specific types in order, none of which a plain LockAcquisitionException satisfies -- including **************** a JDBC-level sibling, not a supertype. It falls through to the else branch and comes out as **************** Swapped the round-2 catch type accordingly and dropped the now-confirmed-dead PessimisticLockException catch. Replaced the hand-picked stand-in exception in the statement-level test (this is the second one caught by review, after round 1's Spring type) with one derived by running a real SQLException(40001) through the actual Hibernate conversion chain (SQLStateConversionDelegate then **************** via reflection), plus a dedicated test pinning that derived type so a future Hibernate upgrade fails loudly here instead of silently re-breaking the controller's catch.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing