Skip to content

Commit b93582a

Browse files
maesenkabeikov
andauthored
Code improvement
Co-authored-by: Christian Beikov <[email protected]>
1 parent 3dd701f commit b93582a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

hibernate-core/src/main/java/org/hibernate/dialect/CockroachDialect.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,11 +1090,9 @@ public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
10901090
}
10911091
return switch (sqlState) {
10921092
// Serialization Exception
1093-
case "40001" -> {
1094-
if ( message.contains("WriteTooOldError") )
1095-
yield new TransactionSerializationException( message, sqlException, sql );
1096-
else yield null;
1097-
}
1093+
case "40001" -> message.contains("WriteTooOldError")
1094+
? new TransactionSerializationException( message, sqlException, sql );
1095+
: null;
10981096
// DEADLOCK DETECTED
10991097
case "40P01" -> new LockAcquisitionException( message, sqlException, sql );
11001098
// LOCK NOT AVAILABLE

0 commit comments

Comments
 (0)