Skip to content

Commit 09e11d6

Browse files
authored
Merge pull request #1579 from slievrly/master
All override methods must be added @OverRide
2 parents 49f7153 + c6e054d commit 09e11d6

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public boolean jdbcCompliant() {
292292
return this.driver.jdbcCompliant();
293293
}
294294

295-
// @Override only valid jdk7+
295+
@Override
296296
public Logger getParentLogger() {
297297
return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
298298
}
@@ -308,7 +308,7 @@ public boolean isWrapperFor(Class<?> iface) throws SQLException {
308308
return false;
309309
}
310310

311-
// @Override only valid jdk7+
311+
@Override
312312
public Logger getParentLogger() {
313313
// requires JDK version 1.6
314314
return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ public ExtensiveSubject(final byte aByte,
6464
public enum TestEnum {
6565
AVALUE, BVALUE, CVALUE;
6666
}
67-
}
67+
}

0 commit comments

Comments
 (0)