Skip to content

Commit 9365a20

Browse files
authored
Merge pull request #1476 from kezhenxu94/polishing-remove-redundant-x
remove redundant imports and initializer
2 parents b69a02e + 68b7b67 commit 9365a20

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

src/main/java/org/apache/ibatis/builder/MapperBuilderAssistant.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import java.util.ArrayList;
1919
import java.util.HashMap;
2020
import java.util.HashSet;
21-
import java.util.Iterator;
2221
import java.util.List;
2322
import java.util.Map;
2423
import java.util.Properties;

src/main/java/org/apache/ibatis/executor/keygen/Jdbc3KeyGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private void assignKeysToParam(final Configuration configuration, ResultSet rs,
120120
final TypeHandlerRegistry typeHandlerRegistry = configuration.getTypeHandlerRegistry();
121121
final ResultSetMetaData rsmd = rs.getMetaData();
122122
// Wrap the parameter in Collection to normalize the logic.
123-
Collection<?> paramAsCollection = null;
123+
Collection<?> paramAsCollection;
124124
if (param instanceof Object[]) {
125125
paramAsCollection = Arrays.asList((Object[]) param);
126126
} else if (!(param instanceof Collection)) {

src/main/java/org/apache/ibatis/executor/loader/ResultLoaderMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private Configuration getConfiguration() {
224224
throw new ExecutorException("Cannot get Configuration as configuration factory was not set.");
225225
}
226226

227-
Object configurationObject = null;
227+
Object configurationObject;
228228
try {
229229
final Method factoryMethod = this.configurationFactory.getDeclaredMethod(FACTORY_METHOD);
230230
if (!Modifier.isStatic(factoryMethod.getModifiers())) {

src/main/java/org/apache/ibatis/reflection/TypeParameterResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ private static Type[] resolveWildcardTypeBounds(Type[] bounds, Type srcType, Cla
134134
}
135135

136136
private static Type resolveTypeVar(TypeVariable<?> typeVar, Type srcType, Class<?> declaringClass) {
137-
Type result = null;
138-
Class<?> clazz = null;
137+
Type result;
138+
Class<?> clazz;
139139
if (srcType instanceof Class) {
140140
clazz = (Class<?>) srcType;
141141
} else if (srcType instanceof ParameterizedType) {

src/main/java/org/apache/ibatis/scripting/xmltags/XMLScriptBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private void initNodeHandlerMap() {
6565

6666
public SqlSource parseScriptNode() {
6767
MixedSqlNode rootSqlNode = parseDynamicTags(context);
68-
SqlSource sqlSource = null;
68+
SqlSource sqlSource;
6969
if (isDynamic) {
7070
sqlSource = new DynamicSqlSource(configuration, rootSqlNode);
7171
} else {

0 commit comments

Comments
 (0)