Skip to content

Commit 35fbf55

Browse files
committed
Revert "Remove unnecessary throws clause"
This reverts commit 5ca5f2d.
1 parent 3f12a01 commit 35fbf55

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public List<BatchResult> flushStatements() {
389389

390390
/**
391391
* Allow gently dispose bean:
392-
*
392+
*
393393
* <pre>
394394
* {@code
395395
*
@@ -407,7 +407,7 @@ public List<BatchResult> flushStatements() {
407407
* @see "org.springframework.beans.factory.support.DisposableBeanAdapter#CLOSE_METHOD_NAME"
408408
*/
409409
@Override
410-
public void destroy() {
410+
public void destroy() throws Exception {
411411
// This method forces spring disposer to avoid call of SqlSessionTemplate.close() which gives
412412
// UnsupportedOperationException
413413
}

src/main/java/org/mybatis/spring/batch/MyBatisCursorItemReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public MyBatisCursorItemReader() {
5050
}
5151

5252
@Override
53-
protected T doRead() {
53+
protected T doRead() throws Exception {
5454
T next = null;
5555
if (cursorIterator.hasNext()) {
5656
next = cursorIterator.next();
@@ -59,7 +59,7 @@ protected T doRead() {
5959
}
6060

6161
@Override
62-
protected void doOpen() {
62+
protected void doOpen() throws Exception {
6363
Map<String, Object> parameters = new HashMap<>();
6464
if (parameterValues != null) {
6565
parameters.putAll(parameterValues);

src/main/java/org/mybatis/spring/transaction/SpringManagedTransaction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ public void rollback() throws SQLException {
111111
* {@inheritDoc}
112112
*/
113113
@Override
114-
public void close() {
114+
public void close() throws SQLException {
115115
DataSourceUtils.releaseConnection(this.connection, this.dataSource);
116116
}
117117

118118
/**
119119
* {@inheritDoc}
120120
*/
121121
@Override
122-
public Integer getTimeout() {
122+
public Integer getTimeout() throws SQLException {
123123
ConnectionHolder holder = (ConnectionHolder) TransactionSynchronizationManager.getResource(dataSource);
124124
if (holder != null && holder.hasTimeout()) {
125125
return holder.getTimeToLiveInSeconds();

0 commit comments

Comments
 (0)