Skip to content

Commit d3e4fae

Browse files
committed
[ci] Add missing seial version uid at 1L (throughout tests)
1 parent 296876d commit d3e4fae

File tree

29 files changed

+120
-3
lines changed

29 files changed

+120
-3
lines changed

src/test/java/org/apache/ibatis/binding/BindingTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ void shouldFindPostsInList() {
107107
try (SqlSession session = sqlSessionFactory.openSession()) {
108108
BoundAuthorMapper mapper = session.getMapper(BoundAuthorMapper.class);
109109
List<Post> posts = mapper.findPostsInList(new ArrayList<Integer>() {
110+
private static final long serialVersionUID = 1L;
110111
{
111112
add(1);
112113
add(3);
@@ -430,6 +431,7 @@ void shouldSelectOneBlogAsMap() {
430431
try (SqlSession session = sqlSessionFactory.openSession()) {
431432
BoundBlogMapper mapper = session.getMapper(BoundBlogMapper.class);
432433
Map<String, Object> blog = mapper.selectBlogAsMap(new HashMap<String, Object>() {
434+
private static final long serialVersionUID = 1L;
433435
{
434436
put("id", 1);
435437
}

src/test/java/org/apache/ibatis/builder/ExampleObjectFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.apache.ibatis.reflection.factory.DefaultObjectFactory;
2222

2323
public class ExampleObjectFactory extends DefaultObjectFactory {
24+
private static final long serialVersionUID = 1L;
2425
private Properties properties;
2526

2627
@Override

src/test/java/org/apache/ibatis/builder/xml/dynamic/DynamicSqlSourceTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ void shouldConditionallyDefault() throws Exception {
8787
final String expected = "SELECT * FROM BLOG WHERE CATEGORY = 'DEFAULT'";
8888
DynamicSqlSource source = createDynamicSqlSource(new TextSqlNode("SELECT * FROM BLOG"),
8989
new ChooseSqlNode(new ArrayList<SqlNode>() {
90+
private static final long serialVersionUID = 1L;
9091
{
9192
add(new IfSqlNode(mixedContents(new TextSqlNode("WHERE CATEGORY = ?")), "false"));
9293
add(new IfSqlNode(mixedContents(new TextSqlNode("WHERE CATEGORY = 'NONE'")), "false"));
@@ -101,6 +102,7 @@ void shouldConditionallyChooseFirst() throws Exception {
101102
final String expected = "SELECT * FROM BLOG WHERE CATEGORY = ?";
102103
DynamicSqlSource source = createDynamicSqlSource(new TextSqlNode("SELECT * FROM BLOG"),
103104
new ChooseSqlNode(new ArrayList<SqlNode>() {
105+
private static final long serialVersionUID = 1L;
104106
{
105107
add(new IfSqlNode(mixedContents(new TextSqlNode("WHERE CATEGORY = ?")), "true"));
106108
add(new IfSqlNode(mixedContents(new TextSqlNode("WHERE CATEGORY = 'NONE'")), "false"));
@@ -115,6 +117,7 @@ void shouldConditionallyChooseSecond() throws Exception {
115117
final String expected = "SELECT * FROM BLOG WHERE CATEGORY = 'NONE'";
116118
DynamicSqlSource source = createDynamicSqlSource(new TextSqlNode("SELECT * FROM BLOG"),
117119
new ChooseSqlNode(new ArrayList<SqlNode>() {
120+
private static final long serialVersionUID = 1L;
118121
{
119122
add(new IfSqlNode(mixedContents(new TextSqlNode("WHERE CATEGORY = ?")), "false"));
120123
add(new IfSqlNode(mixedContents(new TextSqlNode("WHERE CATEGORY = 'NONE'")), "true"));
@@ -262,6 +265,7 @@ void shouldTrimNoSetClause() throws Exception {
262265
@Test
263266
void shouldIterateOnceForEachItemInCollection() throws Exception {
264267
final HashMap<String, String[]> parameterObject = new HashMap<>() {
268+
private static final long serialVersionUID = 1L;
265269
{
266270
put("array", new String[] { "one", "two", "three" });
267271
}
@@ -281,6 +285,7 @@ void shouldIterateOnceForEachItemInCollection() throws Exception {
281285
@Test
282286
void shouldHandleOgnlExpression() throws Exception {
283287
final HashMap<String, String> parameterObject = new HashMap<>() {
288+
private static final long serialVersionUID = 1L;
284289
{
285290
put("name", "Steve");
286291
}
@@ -295,6 +300,7 @@ void shouldHandleOgnlExpression() throws Exception {
295300
@Test
296301
void shouldSkipForEachWhenCollectionIsEmpty() throws Exception {
297302
final HashMap<String, Integer[]> parameterObject = new HashMap<>() {
303+
private static final long serialVersionUID = 1L;
298304
{
299305
put("array", new Integer[] {});
300306
}

src/test/java/org/apache/ibatis/builder/xml/dynamic/ExpressionEvaluatorTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class Bean {
8484
@Test
8585
void shouldIterateOverIterable() {
8686
final HashMap<String, String[]> parameterObject = new HashMap<>() {
87+
private static final long serialVersionUID = 1L;
8788
{
8889
put("array", new String[] { "1", "2", "3" });
8990
}

src/test/java/org/apache/ibatis/cache/SerializedCacheTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ void throwExceptionWhenTryingToCacheNonSerializableObject() {
5656
}
5757

5858
static class CachingObject implements Serializable {
59+
private static final long serialVersionUID = 1L;
5960
int x;
6061

6162
public CachingObject(int x) {

src/test/java/org/apache/ibatis/cursor/defaults/DefaultCursorTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ void shouldCloseImmediatelyIfResultSetIsClosed() throws Exception {
9999
}
100100
}
101101

102-
@SuppressWarnings("serial")
103102
private MappedStatement getNestedAndOrderedMappedStatement() {
104103
final Configuration config = new Configuration();
105104
final TypeHandlerRegistry registry = config.getTypeHandlerRegistry();
106105

107106
ResultMap nestedResultMap = new ResultMap.Builder(config, "roleMap", HashMap.class, new ArrayList<ResultMapping>() {
107+
private static final long serialVersionUID = 1L;
108108
{
109109
add(new ResultMapping.Builder(config, "role", "role", registry.getTypeHandler(String.class)).build());
110110
}
@@ -113,8 +113,10 @@ private MappedStatement getNestedAndOrderedMappedStatement() {
113113

114114
return new MappedStatement.Builder(config, "selectPerson", new StaticSqlSource(config, "select person..."),
115115
SqlCommandType.SELECT).resultMaps(new ArrayList<ResultMap>() {
116+
private static final long serialVersionUID = 1L;
116117
{
117118
add(new ResultMap.Builder(config, "personMap", HashMap.class, new ArrayList<ResultMapping>() {
119+
private static final long serialVersionUID = 1L;
118120
{
119121
add(new ResultMapping.Builder(config, "id", "id", registry.getTypeHandler(Integer.class)).build());
120122
add(new ResultMapping.Builder(config, "roles").nestedResultMapId("roleMap").build());

src/test/java/org/apache/ibatis/datasource/jndi/JndiDataSourceFactoryTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ void shouldRetrieveDataSourceFromJNDI() {
5151
createJndiDataSource();
5252
JndiDataSourceFactory factory = new JndiDataSourceFactory();
5353
factory.setProperties(new Properties() {
54+
private static final long serialVersionUID = 1L;
5455
{
5556
setProperty(JndiDataSourceFactory.ENV_PREFIX + Context.INITIAL_CONTEXT_FACTORY, TEST_INITIAL_CONTEXT_FACTORY);
5657
setProperty(JndiDataSourceFactory.INITIAL_CONTEXT, TEST_INITIAL_CONTEXT);

src/test/java/org/apache/ibatis/domain/blog/Author.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
public class Author implements Serializable {
2121

22+
private static final long serialVersionUID = 1L;
2223
protected int id;
2324
protected String username;
2425
protected String password;

src/test/java/org/apache/ibatis/domain/blog/ComplexImmutableAuthor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.io.Serializable;
1919

2020
public class ComplexImmutableAuthor implements Serializable {
21+
private static final long serialVersionUID = 1L;
2122
private final ComplexImmutableAuthorId theComplexImmutableAuthorId;
2223
protected final String bio;
2324
protected final Section favouriteSection;

src/test/java/org/apache/ibatis/domain/blog/ImmutableAuthor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.io.Serializable;
1919

2020
public class ImmutableAuthor implements Serializable {
21+
private static final long serialVersionUID = 1L;
2122
protected final int id;
2223
protected final String username;
2324
protected final String password;

0 commit comments

Comments
 (0)