Skip to content

Commit d138251

Browse files
committed
Apply formatter and update license year
1 parent c1b267d commit d138251

File tree

79 files changed

+478
-477
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

+478
-477
lines changed

src/main/java/org/mybatis/logging/Logger.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -15,10 +15,10 @@
1515
*/
1616
package org.mybatis.logging;
1717

18-
import org.apache.ibatis.logging.Log;
19-
2018
import java.util.function.Supplier;
2119

20+
import org.apache.ibatis.logging.Log;
21+
2222
/**
2323
* Wrapper of {@link Log}, allow log with lambda expressions.
2424
*

src/main/java/org/mybatis/spring/SqlSessionFactoryBean.java

+8-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
*/
1616
package org.mybatis.spring;
1717

18-
import javax.sql.DataSource;
18+
import static org.springframework.util.Assert.notNull;
19+
import static org.springframework.util.Assert.state;
20+
import static org.springframework.util.ObjectUtils.isEmpty;
21+
import static org.springframework.util.StringUtils.hasLength;
22+
import static org.springframework.util.StringUtils.tokenizeToStringArray;
23+
1924
import java.io.IOException;
2025
import java.lang.reflect.Modifier;
2126
import java.sql.SQLException;
@@ -25,6 +30,8 @@
2530
import java.util.Set;
2631
import java.util.stream.Stream;
2732

33+
import javax.sql.DataSource;
34+
2835
import org.apache.ibatis.builder.xml.XMLConfigBuilder;
2936
import org.apache.ibatis.builder.xml.XMLMapperBuilder;
3037
import org.apache.ibatis.cache.Cache;
@@ -61,12 +68,6 @@
6168
import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy;
6269
import org.springframework.util.ClassUtils;
6370

64-
import static org.springframework.util.Assert.notNull;
65-
import static org.springframework.util.Assert.state;
66-
import static org.springframework.util.ObjectUtils.isEmpty;
67-
import static org.springframework.util.StringUtils.hasLength;
68-
import static org.springframework.util.StringUtils.tokenizeToStringArray;
69-
7071
/**
7172
* {@code FactoryBean} that creates a MyBatis {@code SqlSessionFactory}. This is the usual way to set up a shared
7273
* MyBatis {@code SqlSessionFactory} in a Spring application context; the SqlSessionFactory can then be passed to

src/main/java/org/mybatis/spring/SqlSessionTemplate.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -16,6 +16,7 @@
1616
package org.mybatis.spring;
1717

1818
import static java.lang.reflect.Proxy.newProxyInstance;
19+
1920
import static org.apache.ibatis.reflection.ExceptionUtil.unwrapThrowable;
2021
import static org.mybatis.spring.SqlSessionUtils.closeSqlSession;
2122
import static org.mybatis.spring.SqlSessionUtils.getSqlSession;

src/main/java/org/mybatis/spring/SqlSessionUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -115,7 +115,7 @@ public static SqlSession getSqlSession(SqlSessionFactory sessionFactory, Executo
115115
* Note: The DataSource used by the Environment should be synchronized with the transaction either through
116116
* DataSourceTxMgr or another tx synchronization. Further assume that if an exception is thrown, whatever started the
117117
* transaction will handle closing / rolling back the Connection associated with the SqlSession.
118-
*
118+
*
119119
* @param sessionFactory
120120
* sqlSessionFactory used for registration.
121121
* @param executorType

src/main/java/org/mybatis/spring/annotation/MapperScans.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -15,14 +15,14 @@
1515
*/
1616
package org.mybatis.spring.annotation;
1717

18-
import org.springframework.context.annotation.Import;
19-
2018
import java.lang.annotation.Documented;
2119
import java.lang.annotation.ElementType;
2220
import java.lang.annotation.Retention;
2321
import java.lang.annotation.RetentionPolicy;
2422
import java.lang.annotation.Target;
2523

24+
import org.springframework.context.annotation.Import;
25+
2626
/**
2727
* The Container annotation that aggregates several {@link MapperScan} annotations.
2828
*

src/main/java/org/mybatis/spring/batch/MyBatisBatchItemWriter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -48,7 +48,7 @@
4848
* multiple concurrent transactions.
4949
*
5050
* @author Eduardo Macarron
51-
*
51+
*
5252
* @since 1.1.0
5353
*/
5454
public class MyBatisBatchItemWriter<T> implements ItemWriter<T>, InitializingBean {

src/main/java/org/mybatis/spring/batch/MyBatisPagingItemReader.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -15,26 +15,26 @@
1515
*/
1616
package org.mybatis.spring.batch;
1717

18-
import org.apache.ibatis.session.ExecutorType;
19-
import org.apache.ibatis.session.SqlSession;
20-
import org.apache.ibatis.session.SqlSessionFactory;
21-
import org.mybatis.spring.SqlSessionTemplate;
22-
import org.springframework.batch.item.database.AbstractPagingItemReader;
18+
import static org.springframework.util.Assert.notNull;
19+
import static org.springframework.util.ClassUtils.getShortName;
2320

2421
import java.util.HashMap;
2522
import java.util.Map;
2623
import java.util.concurrent.CopyOnWriteArrayList;
2724

28-
import static org.springframework.util.Assert.notNull;
29-
import static org.springframework.util.ClassUtils.getShortName;
25+
import org.apache.ibatis.session.ExecutorType;
26+
import org.apache.ibatis.session.SqlSession;
27+
import org.apache.ibatis.session.SqlSessionFactory;
28+
import org.mybatis.spring.SqlSessionTemplate;
29+
import org.springframework.batch.item.database.AbstractPagingItemReader;
3030

3131
/**
3232
* {@code org.springframework.batch.item.ItemReader} for reading database records using MyBatis in a paging fashion.
3333
* <p>
3434
* Provided to facilitate the migration from Spring-Batch iBATIS 2 page item readers to MyBatis 3.
3535
*
3636
* @author Eduardo Macarron
37-
*
37+
*
3838
* @since 1.1.0
3939
*/
4040
public class MyBatisPagingItemReader<T> extends AbstractPagingItemReader<T> {
@@ -83,7 +83,7 @@ public void setParameterValues(Map<String, Object> parameterValues) {
8383

8484
/**
8585
* Check mandatory properties.
86-
*
86+
*
8787
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
8888
*/
8989
@Override

src/main/java/org/mybatis/spring/batch/builder/MyBatisBatchItemWriterBuilder.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -15,13 +15,13 @@
1515
*/
1616
package org.mybatis.spring.batch.builder;
1717

18+
import java.util.Optional;
19+
1820
import org.apache.ibatis.session.SqlSessionFactory;
1921
import org.mybatis.spring.SqlSessionTemplate;
2022
import org.mybatis.spring.batch.MyBatisBatchItemWriter;
2123
import org.springframework.core.convert.converter.Converter;
2224

23-
import java.util.Optional;
24-
2525
/**
2626
* A builder for the {@link MyBatisBatchItemWriter}.
2727
*

src/main/java/org/mybatis/spring/batch/builder/MyBatisCursorItemReaderBuilder.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -15,12 +15,12 @@
1515
*/
1616
package org.mybatis.spring.batch.builder;
1717

18-
import org.apache.ibatis.session.SqlSessionFactory;
19-
import org.mybatis.spring.batch.MyBatisCursorItemReader;
20-
2118
import java.util.Map;
2219
import java.util.Optional;
2320

21+
import org.apache.ibatis.session.SqlSessionFactory;
22+
import org.mybatis.spring.batch.MyBatisCursorItemReader;
23+
2424
/**
2525
* A builder for the {@link MyBatisCursorItemReader}.
2626
*

src/main/java/org/mybatis/spring/batch/builder/MyBatisPagingItemReaderBuilder.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -15,12 +15,12 @@
1515
*/
1616
package org.mybatis.spring.batch.builder;
1717

18-
import org.apache.ibatis.session.SqlSessionFactory;
19-
import org.mybatis.spring.batch.MyBatisPagingItemReader;
20-
2118
import java.util.Map;
2219
import java.util.Optional;
2320

21+
import org.apache.ibatis.session.SqlSessionFactory;
22+
import org.mybatis.spring.batch.MyBatisPagingItemReader;
23+
2424
/**
2525
* A builder for the {@link MyBatisPagingItemReader}.
2626
*

src/main/java/org/mybatis/spring/support/SqlSessionDaoSupport.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -28,7 +28,7 @@
2828
* <p>
2929
* This class needs a SqlSessionTemplate or a SqlSessionFactory. If both are set the SqlSessionFactory will be ignored.
3030
* <p>
31-
*
31+
*
3232
* @author Putthiphong Boonphong
3333
* @author Eduardo Macarron
3434
*
@@ -59,7 +59,7 @@ public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
5959
* <p>
6060
* Can be overridden in subclasses to provide a SqlSessionTemplate instance with different configuration, or a custom
6161
* SqlSessionTemplate subclass.
62-
*
62+
*
6363
* @param sqlSessionFactory
6464
* the MyBatis SqlSessionFactory to create a SqlSessionTemplate for
6565
* @return the new SqlSessionTemplate instance

0 commit comments

Comments
 (0)