Skip to content

Commit fa8d9a0

Browse files
committed
refact: update if... else...
1 parent 4cfbddf commit fa8d9a0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/org/apache/ibatis/executor/statement/StatementUtil.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ public static void applyTransactionTimeout(Statement statement, Integer queryTim
4545
return;
4646
}
4747
Integer timeToLiveOfQuery = null;
48-
if (queryTimeout == null || queryTimeout == 0) {
49-
timeToLiveOfQuery = transactionTimeout;
50-
} else if (transactionTimeout < queryTimeout) {
48+
if (queryTimeout == null || queryTimeout == 0 || transactionTimeout < queryTimeout) {
5149
timeToLiveOfQuery = transactionTimeout;
5250
}
5351
if (timeToLiveOfQuery != null) {

0 commit comments

Comments
 (0)