Skip to content

Commit e8a476f

Browse files
committed
wip
1 parent 2a95406 commit e8a476f

File tree

14 files changed

+29
-29
lines changed

14 files changed

+29
-29
lines changed

src/main/java/org/apache/ibatis/builder/ParameterMappingTokenHandler.java

Lines changed: 3 additions & 6 deletions
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-2025 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.
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
1716
package org.apache.ibatis.builder;
1817

1918
import java.util.List;
@@ -40,8 +39,7 @@ public class ParameterMappingTokenHandler extends BaseBuilder implements TokenHa
4039
public ParameterMappingTokenHandler(List<ParameterMapping> parameterMappings, Configuration configuration,
4140
Object parameterObject, Class<?> parameterType, Map<String, Object> additionalParameters, boolean paramExists) {
4241
super(configuration);
43-
this.parameterType = parameterObject == null
44-
? (parameterType == null ? Object.class : parameterType)
42+
this.parameterType = parameterObject == null ? (parameterType == null ? Object.class : parameterType)
4543
: parameterObject.getClass();
4644
this.metaParameters = configuration.newMetaObject(additionalParameters);
4745
this.parameterObject = parameterObject;
@@ -50,8 +48,7 @@ public ParameterMappingTokenHandler(List<ParameterMapping> parameterMappings, Co
5048
}
5149

5250
public ParameterMappingTokenHandler(List<ParameterMapping> parameterMappings, Configuration configuration,
53-
Class<?> parameterType,
54-
Map<String, Object> additionalParameters) {
51+
Class<?> parameterType, Map<String, Object> additionalParameters) {
5552
super(configuration);
5653
this.parameterType = parameterType;
5754
this.metaParameters = configuration.newMetaObject(additionalParameters);

src/main/java/org/apache/ibatis/builder/SqlSourceBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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/main/java/org/apache/ibatis/executor/BaseExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2025 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/main/java/org/apache/ibatis/mapping/ParameterMapping.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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/main/java/org/apache/ibatis/scripting/defaults/DefaultParameterHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2025 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/main/java/org/apache/ibatis/scripting/defaults/RawSqlSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2025 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/main/java/org/apache/ibatis/scripting/xmltags/DynamicContext.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -21,16 +21,16 @@
2121
import java.util.Map;
2222
import java.util.StringJoiner;
2323

24+
import ognl.OgnlContext;
25+
import ognl.OgnlRuntime;
26+
import ognl.PropertyAccessor;
27+
2428
import org.apache.ibatis.builder.ParameterMappingTokenHandler;
2529
import org.apache.ibatis.mapping.ParameterMapping;
2630
import org.apache.ibatis.parsing.GenericTokenParser;
2731
import org.apache.ibatis.reflection.MetaObject;
2832
import org.apache.ibatis.session.Configuration;
2933

30-
import ognl.OgnlContext;
31-
import ognl.OgnlRuntime;
32-
import ognl.PropertyAccessor;
33-
3434
/**
3535
* @author Clinton Begin
3636
*/
@@ -58,7 +58,8 @@ public DynamicContext(Configuration configuration, Class<?> parameterType) {
5858
this(configuration, null, parameterType, false);
5959
}
6060

61-
public DynamicContext(Configuration configuration, Object parameterObject, Class<?> parameterType, boolean paramExists) {
61+
public DynamicContext(Configuration configuration, Object parameterObject, Class<?> parameterType,
62+
boolean paramExists) {
6263
if (parameterObject == null || parameterObject instanceof Map) {
6364
bindings = new ContextMap(null, false);
6465
} else {
@@ -96,7 +97,8 @@ public List<ParameterMapping> getParameterMappings() {
9697

9798
protected String parseParam(String sql) {
9899
if (tokenParser == null) {
99-
tokenHandler = new ParameterMappingTokenHandler(getParameterMappings(), configuration, parameterObject, parameterType, bindings, paramExists);
100+
tokenHandler = new ParameterMappingTokenHandler(getParameterMappings(), configuration, parameterObject,
101+
parameterType, bindings, paramExists);
100102
tokenParser = new GenericTokenParser("#{", "}", tokenHandler);
101103
}
102104
return tokenParser.parse(sql);

src/main/java/org/apache/ibatis/scripting/xmltags/StaticTextSqlNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2025 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/main/java/org/apache/ibatis/scripting/xmltags/TextSqlNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -64,7 +64,7 @@ public String handleToken(String content) {
6464
context.getBindings().put("value", parameter);
6565
}
6666
Object value = OgnlCache.getValue(content, context.getBindings());
67-
// issue #274 return "" instead of "null"
67+
// issue #274 return "" instead of "null"
6868
return value == null ? "" : String.valueOf(value);
6969
}
7070
}

src/main/java/org/apache/ibatis/scripting/xmltags/TrimSqlNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2025 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/java/org/apache/ibatis/builder/SqlSourceBuilderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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/java/org/apache/ibatis/builder/xml/dynamic/DynamicSqlSourceTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -393,7 +393,8 @@ void testShrinkWhitespacesInSql(SqlNode input, boolean shrinkWhitespaces, String
393393

394394
static Stream<Arguments> testShrinkWhitespacesInSql() {
395395
return Stream.of(
396-
Arguments.arguments(new StaticTextSqlNode("\t\n\n SELECT * \n FROM user\n \t WHERE user_id = 1\n\t "), false,
396+
Arguments.arguments(
397+
new StaticTextSqlNode("\t\n\n SELECT * \n FROM user\n \t WHERE user_id = 1\n\t "), false,
397398
"SELECT * \n FROM user\n \t WHERE user_id = 1"),
398399
Arguments.arguments(new StaticTextSqlNode("\t\n\n SELECT * \n FROM user\n \t WHERE user_id = 1\n\t"), true,
399400
"SELECT * FROM user WHERE user_id = 1"));

src/test/java/org/apache/ibatis/submitted/bind_in_foreach/BindInForeachTest.java

Lines changed: 2 additions & 2 deletions
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-2025 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,7 +15,7 @@
1515
*/
1616
package org.apache.ibatis.submitted.bind_in_foreach;
1717

18-
import static org.junit.jupiter.api.Assertions.*;
18+
import static org.junit.jupiter.api.Assertions.assertEquals;
1919

2020
import java.io.Reader;
2121
import java.util.List;

src/test/java/org/apache/ibatis/submitted/raw_sql_source/RawSqlSourceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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,7 +15,7 @@
1515
*/
1616
package org.apache.ibatis.submitted.raw_sql_source;
1717

18-
import static org.junit.jupiter.api.Assertions.*;
18+
import static org.junit.jupiter.api.Assertions.assertEquals;
1919

2020
import java.io.Reader;
2121
import java.util.stream.Stream;

0 commit comments

Comments
 (0)