Skip to content

Commit afff2a2

Browse files
committed
imported ExceptionUtil static methods
1 parent bd80f71 commit afff2a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/mybatis/spring/SqlSessionTemplate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package org.mybatis.spring;
1717

18+
import static org.apache.ibatis.reflection.ExceptionUtil.unwrapThrowable;
1819
import static org.mybatis.spring.SqlSessionUtils.closeSqlSession;
1920
import static org.mybatis.spring.SqlSessionUtils.getSqlSession;
2021
import static org.mybatis.spring.SqlSessionUtils.isSqlSessionTransactional;
@@ -29,7 +30,6 @@
2930

3031
import org.apache.ibatis.exceptions.PersistenceException;
3132
import org.apache.ibatis.executor.BatchResult;
32-
import org.apache.ibatis.reflection.ExceptionUtil;
3333
import org.apache.ibatis.session.Configuration;
3434
import org.apache.ibatis.session.ExecutorType;
3535
import org.apache.ibatis.session.ResultHandler;
@@ -360,7 +360,7 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl
360360
}
361361
return result;
362362
} catch (Throwable t) {
363-
Throwable unwrapped = ExceptionUtil.unwrapThrowable(t);
363+
Throwable unwrapped = unwrapThrowable(t);
364364
if (SqlSessionTemplate.this.exceptionTranslator != null && unwrapped instanceof PersistenceException) {
365365
Throwable translated = SqlSessionTemplate.this.exceptionTranslator.translateExceptionIfPossible((PersistenceException) unwrapped);
366366
if (translated != null) {

0 commit comments

Comments
 (0)