Skip to content

Commit 8ca95e9

Browse files
committed
Merge pull request #489 from hazendaz/master
Added missing overrides and removed unused imports
2 parents 3c5988b + af3cc82 commit 8ca95e9

File tree

79 files changed

+182
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+182
-15
lines changed

src/main/java/org/apache/ibatis/builder/xml/XMLConfigBuilder.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
import java.io.InputStream;
1919
import java.io.Reader;
2020
import java.util.Properties;
21-
import java.util.Set;
22-
2321
import javax.sql.DataSource;
2422

2523
import org.apache.ibatis.builder.BaseBuilder;

src/main/java/org/apache/ibatis/executor/BaseExecutor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import org.apache.ibatis.cache.CacheKey;
2727
import org.apache.ibatis.cache.impl.PerpetualCache;
2828
import org.apache.ibatis.cursor.Cursor;
29-
import org.apache.ibatis.jdbc.SQL;
3029
import org.apache.ibatis.logging.Log;
3130
import org.apache.ibatis.logging.LogFactory;
3231
import org.apache.ibatis.logging.jdbc.ConnectionLogger;

src/main/java/org/apache/ibatis/executor/statement/SimpleStatementHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package org.apache.ibatis.executor.statement;
1717

1818
import java.sql.Connection;
19-
import java.sql.PreparedStatement;
2019
import java.sql.ResultSet;
2120
import java.sql.SQLException;
2221
import java.sql.Statement;

src/test/java/org/apache/ibatis/builder/ExampleObjectFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@
2222

2323
public class ExampleObjectFactory extends DefaultObjectFactory {
2424

25+
@Override
2526
public <T> T create(Class<T> type) {
2627
return super.<T>create(type);
2728
}
2829

30+
@Override
2931
public <T> T create(Class<T> type, List<Class<?>> constructorArgTypes, List<Object> constructorArgs) {
3032
return super.<T>create(type, constructorArgTypes, constructorArgs);
3133
}
3234

35+
@Override
3336
public void setProperties(Properties properties) {
3437
super.setProperties(properties);
3538
}

src/test/java/org/apache/ibatis/builder/ExamplePlugin.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@
2525
@Intercepts({})
2626
public class ExamplePlugin implements Interceptor {
2727

28+
@Override
2829
public Object intercept(Invocation invocation) throws Throwable {
2930
return invocation.proceed();
3031
}
3132

33+
@Override
3234
public Object plugin(Object target) {
3335
return Plugin.wrap(target, this);
3436
}
3537

38+
@Override
3639
public void setProperties(Properties properties) {
3740

3841
}

src/test/java/org/apache/ibatis/builder/ExampleTypeHandler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,22 @@
2525

2626
public class ExampleTypeHandler implements TypeHandler<String> {
2727

28+
@Override
2829
public void setParameter(PreparedStatement ps, int i, String parameter, JdbcType jdbcType) throws SQLException {
2930
ps.setString(i, parameter);
3031
}
3132

33+
@Override
3234
public String getResult(ResultSet rs, String columnName) throws SQLException {
3335
return rs.getString(columnName);
3436
}
3537

38+
@Override
3639
public String getResult(ResultSet rs, int columnIndex) throws SQLException {
3740
return rs.getString(columnIndex);
3841
}
3942

43+
@Override
4044
public String getResult(CallableStatement cs, int columnIndex) throws SQLException {
4145
return cs.getString(columnIndex);
4246
}

src/test/java/org/apache/ibatis/datasource/jndi/JndiDataSourceFactoryTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ private void createJndiDataSource() throws Exception {
7575
}
7676

7777
public static class MockContextFactory implements InitialContextFactory {
78+
@Override
7879
public Context getInitialContext(Hashtable<?, ?> environment) throws NamingException {
7980
return new MockContext(false);
8081
}
@@ -87,10 +88,12 @@ public MockContext(boolean lazy) throws NamingException {
8788
super(lazy);
8889
}
8990

91+
@Override
9092
public Object lookup(String name) throws NamingException {
9193
return bindings.get(name);
9294
}
9395

96+
@Override
9497
public void bind(String name, Object obj) throws NamingException {
9598
bindings.put(name, obj);
9699
}

src/test/java/org/apache/ibatis/domain/blog/Author.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public Section getFavouriteSection() {
9191
return favouriteSection;
9292
}
9393

94+
@Override
9495
public boolean equals(Object o) {
9596
if (this == o) return true;
9697
if (!(o instanceof Author)) return false;
@@ -108,6 +109,7 @@ public boolean equals(Object o) {
108109
return true;
109110
}
110111

112+
@Override
111113
public int hashCode() {
112114
int result;
113115
result = id;
@@ -119,6 +121,7 @@ public int hashCode() {
119121
return result;
120122
}
121123

124+
@Override
122125
public String toString() {
123126
return "Author : " + id + " : " + username + " : " + email;
124127
}

src/test/java/org/apache/ibatis/domain/blog/Blog.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public void setPosts(List<Post> posts) {
6767
this.posts = posts;
6868
}
6969

70+
@Override
7071
public String toString() {
7172
return "Blog: " + id + " : " + title + " (" + author + ")";
7273
}

src/test/java/org/apache/ibatis/domain/blog/Comment.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public void setComment(String comment) {
5454
this.comment = comment;
5555
}
5656

57+
@Override
5758
public String toString() {
5859
return "Comment: " + id + " : " + name + " : " + comment;
5960
}

0 commit comments

Comments
 (0)