Skip to content

Commit 5ffa356

Browse files
committed
All override methods must be added @OverRide
1 parent e0f1978 commit 5ffa356

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

src/main/java/org/apache/ibatis/datasource/pooled/PooledDataSource.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,19 +585,23 @@ public static Connection unwrapConnection(Connection conn) {
585585
return conn;
586586
}
587587

588+
@Override
588589
protected void finalize() throws Throwable {
589590
forceCloseAll();
590591
super.finalize();
591592
}
592593

594+
@Override
593595
public <T> T unwrap(Class<T> iface) throws SQLException {
594596
throw new SQLException(getClass().getName() + " is not a wrapper.");
595597
}
596598

599+
@Override
597600
public boolean isWrapperFor(Class<?> iface) {
598601
return false;
599602
}
600603

604+
@Override
601605
public Logger getParentLogger() {
602606
return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
603607
}

src/main/java/org/apache/ibatis/datasource/unpooled/UnpooledDataSource.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ public boolean jdbcCompliant() {
293293
}
294294

295295
// @Override only valid jdk7+
296+
@Override
296297
public Logger getParentLogger() {
297298
return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
298299
}
@@ -309,6 +310,7 @@ public boolean isWrapperFor(Class<?> iface) throws SQLException {
309310
}
310311

311312
// @Override only valid jdk7+
313+
@Override
312314
public Logger getParentLogger() {
313315
// requires JDK version 1.6
314316
return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);

src/main/java/org/apache/ibatis/mapping/SqlCommandType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
* @author Clinton Begin
2020
*/
2121
public enum SqlCommandType {
22-
UNKNOWN, INSERT, UPDATE, DELETE, SELECT, FLUSH;
22+
UNKNOWN, INSERT, UPDATE, DELETE, SELECT, FLUSH
2323
}

src/main/java/org/apache/ibatis/session/Configuration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,7 @@ public StrictMap<V> conflictMessageProducer(BiFunction<V, V, String> conflictMes
923923
return this;
924924
}
925925

926+
@Override
926927
@SuppressWarnings("unchecked")
927928
public V put(String key, V value) {
928929
if (containsKey(key)) {
@@ -940,6 +941,7 @@ public V put(String key, V value) {
940941
return super.put(key, value);
941942
}
942943

944+
@Override
943945
public V get(Object key) {
944946
V value = super.get(key);
945947
if (value == null) {

src/test/java/org/apache/ibatis/autoconstructor/ExtensiveSubject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ public ExtensiveSubject(final byte aByte,
6262
}
6363

6464
public enum TestEnum {
65-
AVALUE, BVALUE, CVALUE;
65+
AVALUE, BVALUE, CVALUE
6666
}
67-
}
67+
}

src/test/java/org/apache/ibatis/session/SqlSessionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ void shouldFailSelectOneAuthorUsingMapperClassWithTwoResultHandlers() {
583583
Configuration configuration = new Configuration(sqlMapper.getConfiguration().getEnvironment());
584584
configuration.addMapper(AuthorMapperWithMultipleHandlers.class);
585585
SqlSessionFactory sqlMapperWithMultipleHandlers = new DefaultSqlSessionFactory(configuration);
586-
try (SqlSession sqlSession = sqlMapperWithMultipleHandlers.openSession();) {
586+
try (SqlSession sqlSession = sqlMapperWithMultipleHandlers.openSession()) {
587587
DefaultResultHandler handler1 = new DefaultResultHandler();
588588
DefaultResultHandler handler2 = new DefaultResultHandler();
589589
AuthorMapperWithMultipleHandlers mapper = sqlSession.getMapper(AuthorMapperWithMultipleHandlers.class);
@@ -596,7 +596,7 @@ void shouldFailSelectOneAuthorUsingMapperClassWithTwoRowBounds() {
596596
Configuration configuration = new Configuration(sqlMapper.getConfiguration().getEnvironment());
597597
configuration.addMapper(AuthorMapperWithRowBounds.class);
598598
SqlSessionFactory sqlMapperWithMultipleHandlers = new DefaultSqlSessionFactory(configuration);
599-
try (SqlSession sqlSession = sqlMapperWithMultipleHandlers.openSession();) {
599+
try (SqlSession sqlSession = sqlMapperWithMultipleHandlers.openSession()) {
600600
RowBounds bounds1 = new RowBounds(0, 1);
601601
RowBounds bounds2 = new RowBounds(0, 1);
602602
AuthorMapperWithRowBounds mapper = sqlSession.getMapper(AuthorMapperWithRowBounds.class);

0 commit comments

Comments
 (0)