diff --git a/src/test/java/org/apache/ibatis/binding/FlushTest.java b/src/test/java/org/apache/ibatis/binding/FlushTest.java
index 295e0621c29..8225a2b0aff 100644
--- a/src/test/java/org/apache/ibatis/binding/FlushTest.java
+++ b/src/test/java/org/apache/ibatis/binding/FlushTest.java
@@ -35,11 +35,11 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
-public class FlushTest {
+class FlushTest {
private static SqlSessionFactory sqlSessionFactory;
@BeforeAll
- public static void setup() throws Exception {
+ static void setup() throws Exception {
DataSource dataSource = BaseDataTest.createBlogDataSource();
TransactionFactory transactionFactory = new JdbcTransactionFactory();
Environment environment = new Environment("Production", transactionFactory, dataSource);
@@ -52,7 +52,7 @@ public static void setup() throws Exception {
}
@Test
- public void invokeFlushStatementsViaMapper() {
+ void invokeFlushStatementsViaMapper() {
try (SqlSession session = sqlSessionFactory.openSession()) {
BoundAuthorMapper mapper = session.getMapper(BoundAuthorMapper.class);
diff --git a/src/test/java/org/apache/ibatis/builder/XmlMapperBuilderTest.java b/src/test/java/org/apache/ibatis/builder/XmlMapperBuilderTest.java
index 2c2e80caf70..c0ab4f388bc 100644
--- a/src/test/java/org/apache/ibatis/builder/XmlMapperBuilderTest.java
+++ b/src/test/java/org/apache/ibatis/builder/XmlMapperBuilderTest.java
@@ -205,7 +205,7 @@ void shouldFailedLoadXMLMapperFile() throws Exception {
// }
@Test
- public void erorrResultMapLocation() throws Exception {
+ void erorrResultMapLocation() throws Exception {
Configuration configuration = new Configuration();
String resource = "org/apache/ibatis/builder/ProblemResultMapper.xml";
try (InputStream inputStream = Resources.getResourceAsStream(resource)) {
diff --git a/src/test/java/org/apache/ibatis/datasource/unpooled/NetworkTimeoutTest.java b/src/test/java/org/apache/ibatis/datasource/unpooled/NetworkTimeoutTest.java
index 32477db80d4..32c8d3c0b8b 100644
--- a/src/test/java/org/apache/ibatis/datasource/unpooled/NetworkTimeoutTest.java
+++ b/src/test/java/org/apache/ibatis/datasource/unpooled/NetworkTimeoutTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2009-2019 the original author or authors.
+ * Copyright 2009-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.ibatis.datasource.unpooled;
import static org.junit.jupiter.api.Assertions.*;
@@ -26,7 +25,7 @@
import org.junit.jupiter.api.Test;
@Tag("TestcontainersTests")
-public class NetworkTimeoutTest {
+class NetworkTimeoutTest {
@Test
void testNetworkTimeout_UnpooledDataSource() throws Exception {
diff --git a/src/test/java/org/apache/ibatis/executor/BaseExecutorTest.java b/src/test/java/org/apache/ibatis/executor/BaseExecutorTest.java
index 0ad4226963d..09e7997c847 100644
--- a/src/test/java/org/apache/ibatis/executor/BaseExecutorTest.java
+++ b/src/test/java/org/apache/ibatis/executor/BaseExecutorTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2009-2019 the original author or authors.
+ * Copyright 2009-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -373,7 +373,7 @@ void shouldFetchOneOrphanedPostWithNoBlog() throws Exception {
}
@Test
- public void shouldFetchPostWithBlogWithCompositeKey() throws Exception {
+ void shouldFetchPostWithBlogWithCompositeKey() throws Exception {
Executor executor = createExecutor(new JdbcTransaction(ds, null, false));
try {
diff --git a/src/test/java/org/apache/ibatis/logging/jdbc/StatementLoggerTest.java b/src/test/java/org/apache/ibatis/logging/jdbc/StatementLoggerTest.java
index a37a1164d6d..60a17cff1e7 100644
--- a/src/test/java/org/apache/ibatis/logging/jdbc/StatementLoggerTest.java
+++ b/src/test/java/org/apache/ibatis/logging/jdbc/StatementLoggerTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2009-2019 the original author or authors.
+ * Copyright 2009-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
import org.mockito.junit.jupiter.MockitoExtension;
@ExtendWith(MockitoExtension.class)
-public class StatementLoggerTest {
+class StatementLoggerTest {
@Mock
Statement statement;
diff --git a/src/test/java/org/apache/ibatis/parsing/XPathParserTest.java b/src/test/java/org/apache/ibatis/parsing/XPathParserTest.java
index f646318ebaf..c9771b5add9 100644
--- a/src/test/java/org/apache/ibatis/parsing/XPathParserTest.java
+++ b/src/test/java/org/apache/ibatis/parsing/XPathParserTest.java
@@ -195,7 +195,7 @@ private void testEvalMethod(XPathParser parser) {
}
@Test
- public void formatXNodeToString() {
+ void formatXNodeToString() {
XPathParser parser = new XPathParser("100Tom30BMWAudiBenz");
String usersNodeToString = parser.evalNode("/users").toString();
String userNodeToString = parser.evalNode("/users/user").toString();
diff --git a/src/test/java/org/apache/ibatis/reflection/ReflectorTest.java b/src/test/java/org/apache/ibatis/reflection/ReflectorTest.java
index 191da071878..29d8283693f 100644
--- a/src/test/java/org/apache/ibatis/reflection/ReflectorTest.java
+++ b/src/test/java/org/apache/ibatis/reflection/ReflectorTest.java
@@ -224,7 +224,7 @@ public void setProp2(boolean arg) {}
}
@Test
- public void shouldTwoGettersForNonBooleanPropertyThrowException() throws Exception {
+ void shouldTwoGettersForNonBooleanPropertyThrowException() throws Exception {
@SuppressWarnings("unused")
class BeanClass {
public Integer getProp1() {return 1;}
@@ -256,7 +256,7 @@ class BeanClass {
}
@Test
- public void shouldTwoGettersWithDifferentTypesThrowException() throws Exception {
+ void shouldTwoGettersWithDifferentTypesThrowException() throws Exception {
@SuppressWarnings("unused")
class BeanClass {
public Integer getProp1() {return 1;}
diff --git a/src/test/java/org/apache/ibatis/scripting/xmltags/OgnlCacheTest.java b/src/test/java/org/apache/ibatis/scripting/xmltags/OgnlCacheTest.java
index 538a7e6cdcb..02252b576d3 100644
--- a/src/test/java/org/apache/ibatis/scripting/xmltags/OgnlCacheTest.java
+++ b/src/test/java/org/apache/ibatis/scripting/xmltags/OgnlCacheTest.java
@@ -29,7 +29,7 @@
import org.junit.jupiter.api.Test;
-public class OgnlCacheTest {
+class OgnlCacheTest {
@Test
void concurrentAccess() throws Exception {
class DataClass {
diff --git a/src/test/java/org/apache/ibatis/session/SqlSessionManagerTest.java b/src/test/java/org/apache/ibatis/session/SqlSessionManagerTest.java
index 7a91636b2b9..842e42bc5cf 100644
--- a/src/test/java/org/apache/ibatis/session/SqlSessionManagerTest.java
+++ b/src/test/java/org/apache/ibatis/session/SqlSessionManagerTest.java
@@ -100,13 +100,13 @@ void shouldImplicitlyRollbackInsertedAuthor() {
}
@Test
- public void shouldFindAllPostLites() throws Exception {
+ void shouldFindAllPostLites() throws Exception {
List posts = manager.selectList("org.apache.ibatis.domain.blog.mappers.PostMapper.selectPostLite");
assertEquals(2, posts.size()); // old gcode issue #392, new #1848
}
@Test
- public void shouldFindAllMutablePostLites() throws Exception {
+ void shouldFindAllMutablePostLites() throws Exception {
List posts = manager.selectList("org.apache.ibatis.domain.blog.mappers.PostMapper.selectMutablePostLite");
assertEquals(2, posts.size()); // old gcode issue #392, new #1848
}
diff --git a/src/test/java/org/apache/ibatis/submitted/array_type_handler/ArrayTypeHandlerTest.java b/src/test/java/org/apache/ibatis/submitted/array_type_handler/ArrayTypeHandlerTest.java
index 6df13f529db..51032e3f9d5 100644
--- a/src/test/java/org/apache/ibatis/submitted/array_type_handler/ArrayTypeHandlerTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/array_type_handler/ArrayTypeHandlerTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2009-2019 the original author or authors.
+ * Copyright 2009-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,12 +28,12 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-public class ArrayTypeHandlerTest {
+class ArrayTypeHandlerTest {
private SqlSessionFactory sqlSessionFactory;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
try (Reader reader = Resources
.getResourceAsReader("org/apache/ibatis/submitted/array_type_handler/mybatis-config.xml")) {
sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
@@ -44,7 +44,7 @@ public void setUp() throws Exception {
}
@Test
- public void shouldInsertArrayValue() throws Exception {
+ void shouldInsertArrayValue() throws Exception {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
User user = new User();
user.setId(1);
@@ -64,7 +64,7 @@ public void shouldInsertArrayValue() throws Exception {
}
@Test
- public void shouldInsertNullValue() throws Exception {
+ void shouldInsertNullValue() throws Exception {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
User user = new User();
user.setId(1);
diff --git a/src/test/java/org/apache/ibatis/submitted/global_variables_defaults/AnnotationMapperTest.java b/src/test/java/org/apache/ibatis/submitted/global_variables_defaults/AnnotationMapperTest.java
index 9d9b0cf328e..db800df847c 100644
--- a/src/test/java/org/apache/ibatis/submitted/global_variables_defaults/AnnotationMapperTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/global_variables_defaults/AnnotationMapperTest.java
@@ -31,10 +31,10 @@
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
-public class AnnotationMapperTest {
+class AnnotationMapperTest {
@Test
- public void applyDefaultValueOnAnnotationMapper() throws IOException {
+ void applyDefaultValueOnAnnotationMapper() throws IOException {
Properties props = new Properties();
props.setProperty(PropertyParser.KEY_ENABLE_DEFAULT_VALUE, "true");
@@ -56,7 +56,7 @@ public void applyDefaultValueOnAnnotationMapper() throws IOException {
}
@Test
- public void applyPropertyValueOnAnnotationMapper() throws IOException {
+ void applyPropertyValueOnAnnotationMapper() throws IOException {
Properties props = new Properties();
props.setProperty(PropertyParser.KEY_ENABLE_DEFAULT_VALUE, "true");
diff --git a/src/test/java/org/apache/ibatis/submitted/global_variables_defaults/XmlMapperTest.java b/src/test/java/org/apache/ibatis/submitted/global_variables_defaults/XmlMapperTest.java
index 6060bddbc68..f4106e88a9e 100644
--- a/src/test/java/org/apache/ibatis/submitted/global_variables_defaults/XmlMapperTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/global_variables_defaults/XmlMapperTest.java
@@ -28,7 +28,7 @@
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
-public class XmlMapperTest {
+class XmlMapperTest {
@Test
void applyDefaultValueOnXmlMapper() throws IOException {
diff --git a/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/CglibLazyTest.java b/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/CglibLazyTest.java
index 73503c1d293..edb60293847 100644
--- a/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/CglibLazyTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/CglibLazyTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2009-2018 the original author or authors.
+ * Copyright 2009-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
package org.apache.ibatis.submitted.lazyload_proxyfactory_comparison;
-public class CglibLazyTest extends AbstractLazyTest {
+class CglibLazyTest extends AbstractLazyTest {
@Override
protected String getConfiguration() {
return "cglib";
diff --git a/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/DefaultLazyTest.java b/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/DefaultLazyTest.java
index 5f84d214737..17b966a2869 100644
--- a/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/DefaultLazyTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/DefaultLazyTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2009-2018 the original author or authors.
+ * Copyright 2009-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
package org.apache.ibatis.submitted.lazyload_proxyfactory_comparison;
-public class DefaultLazyTest extends AbstractLazyTest {
+class DefaultLazyTest extends AbstractLazyTest {
@Override
protected String getConfiguration() {
return "default";
diff --git a/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/JavassistLazyTest.java b/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/JavassistLazyTest.java
index c86c27c36c7..19e26a7ba10 100644
--- a/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/JavassistLazyTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/JavassistLazyTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2009-2019 the original author or authors.
+ * Copyright 2009-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
import org.junit.jupiter.api.Disabled;
@Disabled("See Issue 664: Javassist ProxyFactory does not handle interfaces with generics correctly.")
-public class JavassistLazyTest
+class JavassistLazyTest
extends AbstractLazyTest {
@Override
protected String getConfiguration() {
diff --git a/src/test/java/org/apache/ibatis/submitted/localtime/LocalTimeTest.java b/src/test/java/org/apache/ibatis/submitted/localtime/LocalTimeTest.java
index 3a9c6e90c7d..619a12a69b7 100644
--- a/src/test/java/org/apache/ibatis/submitted/localtime/LocalTimeTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/localtime/LocalTimeTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2009-2019 the original author or authors.
+ * Copyright 2009-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
-public class LocalTimeTest {
+class LocalTimeTest {
private static SqlSessionFactory sqlSessionFactory;
diff --git a/src/test/java/org/apache/ibatis/submitted/multidb/MultiDbTest.java b/src/test/java/org/apache/ibatis/submitted/multidb/MultiDbTest.java
index bf04f0155e1..ea3b1e74992 100644
--- a/src/test/java/org/apache/ibatis/submitted/multidb/MultiDbTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/multidb/MultiDbTest.java
@@ -27,13 +27,13 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
-public class MultiDbTest {
+class MultiDbTest {
protected static SqlSessionFactory sqlSessionFactory;
protected static SqlSessionFactory sqlSessionFactory2;
@BeforeAll
- public static void setUp() throws Exception {
+ static void setUp() throws Exception {
try (Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/multidb/MultiDbConfig.xml")) {
sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
}
@@ -43,7 +43,7 @@ public static void setUp() throws Exception {
}
@Test
- public void shouldExecuteHsqlQuery() {
+ void shouldExecuteHsqlQuery() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
MultiDbMapper mapper = sqlSession.getMapper(MultiDbMapper.class);
String answer = mapper.select1(1);
@@ -52,7 +52,7 @@ public void shouldExecuteHsqlQuery() {
}
@Test
- public void shouldExecuteCommonQuery() {
+ void shouldExecuteCommonQuery() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
MultiDbMapper mapper = sqlSession.getMapper(MultiDbMapper.class);
String answer = mapper.select2(1);
@@ -61,7 +61,7 @@ public void shouldExecuteCommonQuery() {
}
@Test
- public void shouldExecuteHsqlQueryWithDynamicIf() {
+ void shouldExecuteHsqlQueryWithDynamicIf() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
MultiDbMapper mapper = sqlSession.getMapper(MultiDbMapper.class);
String answer = mapper.select3(1);
@@ -70,7 +70,7 @@ public void shouldExecuteHsqlQueryWithDynamicIf() {
}
@Test
- public void shouldExecuteHsqlQueryWithInclude() {
+ void shouldExecuteHsqlQueryWithInclude() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
MultiDbMapper mapper = sqlSession.getMapper(MultiDbMapper.class);
String answer = mapper.select4(1);
@@ -79,7 +79,7 @@ public void shouldExecuteHsqlQueryWithInclude() {
}
@Test
- public void shouldInsertInCommonWithSelectKey() {
+ void shouldInsertInCommonWithSelectKey() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
MultiDbMapper mapper = sqlSession.getMapper(MultiDbMapper.class);
mapper.insert(new User(2, "test"));
@@ -89,7 +89,7 @@ public void shouldInsertInCommonWithSelectKey() {
}
@Test
- public void shouldInsertInCommonWithSelectKey2() {
+ void shouldInsertInCommonWithSelectKey2() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
MultiDbMapper mapper = sqlSession.getMapper(MultiDbMapper.class);
mapper.insert2(new User(2, "test"));
diff --git a/src/test/java/org/apache/ibatis/submitted/refid_resolution/RefidResolutionTest.java b/src/test/java/org/apache/ibatis/submitted/refid_resolution/RefidResolutionTest.java
index f2a59a0baf9..558c1ee6876 100644
--- a/src/test/java/org/apache/ibatis/submitted/refid_resolution/RefidResolutionTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/refid_resolution/RefidResolutionTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2009-2018 the original author or authors.
+ * Copyright 2009-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,9 +24,9 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-public class RefidResolutionTest {
+class RefidResolutionTest {
@Test
- public void testIncludes() throws Exception {
+ void testIncludes() throws Exception {
String resource = "org/apache/ibatis/submitted/refid_resolution/MapperConfig.xml";
Reader reader = Resources.getResourceAsReader(resource);
SqlSessionFactoryBuilder builder = new SqlSessionFactoryBuilder();
diff --git a/src/test/java/org/apache/ibatis/submitted/timezone_edge_case/TimezoneEdgeCaseTest.java b/src/test/java/org/apache/ibatis/submitted/timezone_edge_case/TimezoneEdgeCaseTest.java
index e4a84beb661..9ab7bbb3901 100644
--- a/src/test/java/org/apache/ibatis/submitted/timezone_edge_case/TimezoneEdgeCaseTest.java
+++ b/src/test/java/org/apache/ibatis/submitted/timezone_edge_case/TimezoneEdgeCaseTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2009-2019 the original author or authors.
+ * Copyright 2009-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-public class TimezoneEdgeCaseTest {
+class TimezoneEdgeCaseTest {
private static SqlSessionFactory sqlSessionFactory;
private TimeZone timeZone;