Skip to content

Commit 5ca5f2d

Browse files
committed
Remove unnecessary throws clause
1 parent 0d467a3 commit 5ca5f2d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2018 the original author or authors.
2+
* Copyright 2010-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -412,7 +412,7 @@ public List<BatchResult> flushStatements() {
412412
* @see "org.springframework.beans.factory.support.DisposableBeanAdapter#CLOSE_METHOD_NAME"
413413
*/
414414
@Override
415-
public void destroy() throws Exception {
415+
public void destroy() {
416416
//This method forces spring disposer to avoid call of SqlSessionTemplate.close() which gives UnsupportedOperationException
417417
}
418418

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2017 the original author or authors.
2+
* Copyright 2010-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@ public MyBatisCursorItemReader() {
4949
}
5050

5151
@Override
52-
protected T doRead() throws Exception {
52+
protected T doRead() {
5353
T next = null;
5454
if (cursorIterator.hasNext()) {
5555
next = cursorIterator.next();
@@ -58,7 +58,7 @@ protected T doRead() throws Exception {
5858
}
5959

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

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2017 the original author or authors.
2+
* Copyright 2010-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -117,15 +117,15 @@ public void rollback() throws SQLException {
117117
* {@inheritDoc}
118118
*/
119119
@Override
120-
public void close() throws SQLException {
120+
public void close() {
121121
DataSourceUtils.releaseConnection(this.connection, this.dataSource);
122122
}
123123

124124
/**
125125
* {@inheritDoc}
126126
*/
127127
@Override
128-
public Integer getTimeout() throws SQLException {
128+
public Integer getTimeout() {
129129
ConnectionHolder holder = (ConnectionHolder) TransactionSynchronizationManager.getResource(dataSource);
130130
if (holder != null && holder.hasTimeout()) {
131131
return holder.getTimeToLiveInSeconds();

0 commit comments

Comments
 (0)