Skip to content

Commit 31c90dd

Browse files
committed
check style
1 parent f2b1a69 commit 31c90dd

File tree

10 files changed

+30
-15
lines changed

10 files changed

+30
-15
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ public String getMapKey() {
374374
return mapKey;
375375
}
376376

377-
378377
public String getMapValue() {
379378
return mapValue;
380379
}
@@ -403,5 +402,4 @@ private String getMapValue(Method method) {
403402

404403
}
405404

406-
407405
}

src/main/java/org/apache/ibatis/executor/result/DefaultMapResultHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public class DefaultMapResultHandler<K, V> implements ResultHandler<V> {
3737
private final ReflectorFactory reflectorFactory;
3838

3939
@SuppressWarnings("unchecked")
40-
public DefaultMapResultHandler(String mapKey, String mapValue, ObjectFactory objectFactory, ObjectWrapperFactory objectWrapperFactory,
41-
ReflectorFactory reflectorFactory) {
40+
public DefaultMapResultHandler(String mapKey, String mapValue, ObjectFactory objectFactory,
41+
ObjectWrapperFactory objectWrapperFactory, ReflectorFactory reflectorFactory) {
4242
this.objectFactory = objectFactory;
4343
this.objectWrapperFactory = objectWrapperFactory;
4444
this.reflectorFactory = reflectorFactory;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ public interface SqlSession extends Closeable {
172172
* The property to use as key for each value in the list.
173173
* @param mapValue
174174
* The property to use as value for each value in the list.
175+
*
175176
* @return Map containing key pair data.
176177
*/
177178
<K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey, String mapValue);
@@ -194,6 +195,7 @@ public interface SqlSession extends Closeable {
194195
* The property to use as value for each value in the list.
195196
* @param rowBounds
196197
* Bounds to limit object retrieval
198+
*
197199
* @return Map containing key pair data.
198200
*/
199201
<K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey, String mapValue, RowBounds rowBounds);

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ public <K, V> Map<K, V> selectMap(String statement, Object parameter, String map
182182
public <K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey, String mapValue) {
183183
return sqlSessionProxy.selectMap(statement, parameter, mapKey, mapValue);
184184
}
185+
185186
@Override
186-
public <K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey, String mapValue, RowBounds rowBounds) {
187+
public <K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey, String mapValue,
188+
RowBounds rowBounds) {
187189
return sqlSessionProxy.selectMap(statement, parameter, mapKey, rowBounds);
188190
}
189191

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ public <K, V> Map<K, V> selectMap(String statement, Object parameter, String map
105105
}
106106

107107
@Override
108-
public <K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey, String mapValue, RowBounds rowBounds) {
108+
public <K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey, String mapValue,
109+
RowBounds rowBounds) {
109110
final List<? extends V> list = selectList(statement, parameter, rowBounds);
110111
final DefaultMapResultHandler<K, V> mapResultHandler = new DefaultMapResultHandler<>(mapKey, mapValue,
111112
configuration.getObjectFactory(), configuration.getObjectWrapperFactory(), configuration.getReflectorFactory());

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import java.util.LinkedHashMap;
2929
import java.util.List;
3030
import java.util.Map;
31-
import java.util.function.Consumer;
3231

3332
import javassist.util.proxy.Proxy;
3433

@@ -184,9 +183,7 @@ void shouldSelectAllAuthorsAsMap() {
184183

185184
@Test
186185
public void shouldGroupStatusAsMap() {
187-
try (
188-
SqlSession sqlSession = sqlMapper.openSession()
189-
) {
186+
try (SqlSession sqlSession = sqlMapper.openSession()) {
190187
NoticeMapper mapper = sqlSession.getMapper(NoticeMapper.class);
191188
Map<Integer, Integer> statusCount = mapper.groupStatus();
192189
assertEquals(2, statusCount.size());

src/test/java/org/apache/ibatis/submitted/mapkey_value/NoticeMapper.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1+
/*
2+
* Copyright 2009-2023 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package org.apache.ibatis.submitted.mapkey_value;
217

18+
import java.util.Map;
19+
320
import org.apache.ibatis.annotations.MapKey;
421
import org.apache.ibatis.annotations.MapValue;
522

6-
import java.util.Map;
7-
823
public interface NoticeMapper {
924

1025
@MapKey("status")

src/test/resources/org/apache/ibatis/builder/MapperConfig.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<!--
33
4-
Copyright 2009-2022 the original author or authors.
4+
Copyright 2009-2023 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.

src/test/resources/org/apache/ibatis/databases/blog/blog-derby-dataload.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--
2-
-- Copyright 2009-2022 the original author or authors.
2+
-- Copyright 2009-2023 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.

src/test/resources/org/apache/ibatis/databases/blog/blog-derby-schema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--
2-
-- Copyright 2009-2022 the original author or authors.
2+
-- Copyright 2009-2023 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.

0 commit comments

Comments
 (0)