Skip to content

Commit b69a02e

Browse files
authored
Merge pull request #1475 from kazuki43zoo/polish-type-argument
Remove unnecessary explicit type arguments
2 parents ce3fc3a + bf518ca commit b69a02e

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

src/main/java/org/apache/ibatis/binding/MapperMethod.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ private <E> Object executeForMany(SqlSession sqlSession, Object[] args) {
142142
Object param = method.convertArgsToSqlCommandParam(args);
143143
if (method.hasRowBounds()) {
144144
RowBounds rowBounds = method.extractRowBounds(args);
145-
result = sqlSession.<E>selectList(command.getName(), param, rowBounds);
145+
result = sqlSession.selectList(command.getName(), param, rowBounds);
146146
} else {
147-
result = sqlSession.<E>selectList(command.getName(), param);
147+
result = sqlSession.selectList(command.getName(), param);
148148
}
149149
// issue #510 Collections & arrays support
150150
if (!method.getReturnType().isAssignableFrom(result.getClass())) {
@@ -162,9 +162,9 @@ private <T> Cursor<T> executeForCursor(SqlSession sqlSession, Object[] args) {
162162
Object param = method.convertArgsToSqlCommandParam(args);
163163
if (method.hasRowBounds()) {
164164
RowBounds rowBounds = method.extractRowBounds(args);
165-
result = sqlSession.<T>selectCursor(command.getName(), param, rowBounds);
165+
result = sqlSession.selectCursor(command.getName(), param, rowBounds);
166166
} else {
167-
result = sqlSession.<T>selectCursor(command.getName(), param);
167+
result = sqlSession.selectCursor(command.getName(), param);
168168
}
169169
return result;
170170
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ private void resultMapElements(List<XNode> list) throws Exception {
250250
}
251251

252252
private ResultMap resultMapElement(XNode resultMapNode) throws Exception {
253-
return resultMapElement(resultMapNode, Collections.<ResultMapping> emptyList(), null);
253+
return resultMapElement(resultMapNode, Collections.emptyList(), null);
254254
}
255255

256256
private ResultMap resultMapElement(XNode resultMapNode, List<ResultMapping> additionalResultMappings, Class<?> enclosingType) throws Exception {
@@ -385,7 +385,7 @@ private ResultMapping buildResultMappingFromContext(XNode context, Class<?> resu
385385
String jdbcType = context.getStringAttribute("jdbcType");
386386
String nestedSelect = context.getStringAttribute("select");
387387
String nestedResultMap = context.getStringAttribute("resultMap",
388-
processNestedResultMappings(context, Collections.<ResultMapping> emptyList(), resultType));
388+
processNestedResultMappings(context, Collections.emptyList(), resultType));
389389
String notNullColumn = context.getStringAttribute("notNullColumn");
390390
String columnPrefix = context.getStringAttribute("columnPrefix");
391391
String typeHandler = context.getStringAttribute("typeHandler");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private <E> List<E> selectList() throws SQLException {
7878
localExecutor = newExecutor();
7979
}
8080
try {
81-
return localExecutor.<E> query(mappedStatement, parameterObject, RowBounds.DEFAULT, Executor.NO_RESULT_HANDLER, cacheKey, boundSql);
81+
return localExecutor.query(mappedStatement, parameterObject, RowBounds.DEFAULT, Executor.NO_RESULT_HANDLER, cacheKey, boundSql);
8282
} finally {
8383
if (localExecutor != executor) {
8484
localExecutor.close(false);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2016 the original author or authors.
2+
* Copyright 2009-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.
@@ -76,7 +76,7 @@ public int update(Statement statement) throws SQLException {
7676

7777
@Override
7878
public <E> List<E> query(Statement statement, ResultHandler resultHandler) throws SQLException {
79-
return delegate.<E>query(statement, resultHandler);
79+
return delegate.query(statement, resultHandler);
8080
}
8181

8282
@Override

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2018 the original author or authors.
2+
* Copyright 2009-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.
@@ -208,7 +208,7 @@ public <E> List<E> selectList(String statement, Object parameter) {
208208

209209
@Override
210210
public <E> List<E> selectList(String statement, Object parameter, RowBounds rowBounds) {
211-
return sqlSessionProxy.<E> selectList(statement, parameter, rowBounds);
211+
return sqlSessionProxy.selectList(statement, parameter, rowBounds);
212212
}
213213

214214
@Override

src/main/java/org/apache/ibatis/session/defaults/DefaultSqlSession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public DefaultSqlSession(Configuration configuration, Executor executor) {
6767

6868
@Override
6969
public <T> T selectOne(String statement) {
70-
return this.<T>selectOne(statement, null);
70+
return this.selectOne(statement, null);
7171
}
7272

7373
@Override
@@ -288,7 +288,7 @@ public Configuration getConfiguration() {
288288

289289
@Override
290290
public <T> T getMapper(Class<T> type) {
291-
return configuration.<T>getMapper(type, this);
291+
return configuration.getMapper(type, this);
292292
}
293293

294294
@Override

0 commit comments

Comments
 (0)