Skip to content

Commit 1bcc4df

Browse files
authored
Merge pull request #225 from hazendaz/master
Fix method to use 'list' rather than 'arraylist'
2 parents db4e77e + 98a162d commit 1bcc4df

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

.mvn/settings.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 2015-2024 the original author or authors.
4+
Copyright 2015-2025 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.

pom.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 2015-2024 the original author or authors.
4+
Copyright 2015-2025 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/main/java/org/mybatis/scripting/freemarker/FreeMarkerLanguageDriverConfig.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2023 the original author or authors.
2+
* Copyright 2015-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.
@@ -387,8 +387,7 @@ private static void override(FreeMarkerLanguageDriverConfig config, Properties p
387387
MetaObject metaObject = MetaObject.forObject(config, new DefaultObjectFactory(), new DefaultObjectWrapperFactory(),
388388
new DefaultReflectorFactory());
389389
properties.forEach((key, value) -> {
390-
String propertyPath = WordUtils
391-
.uncapitalize(WordUtils.capitalize(Objects.toString(key), '-').replace("-", ""));
390+
String propertyPath = WordUtils.uncapitalize(WordUtils.capitalize(Objects.toString(key), '-').replace("-", ""));
392391
Optional.ofNullable(value).ifPresent(v -> {
393392
Object convertedValue = TYPE_CONVERTERS.get(metaObject.getSetterType(propertyPath)).apply(value.toString());
394393
metaObject.setValue(propertyPath, convertedValue);

src/main/java/org/mybatis/scripting/freemarker/FreeMarkerSqlSource.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2023 the original author or authors.
2+
* Copyright 2015-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.
@@ -19,6 +19,7 @@
1919
import java.io.IOException;
2020
import java.util.ArrayList;
2121
import java.util.HashMap;
22+
import java.util.List;
2223
import java.util.Map;
2324

2425
import org.apache.ibatis.builder.SqlSourceBuilder;
@@ -74,7 +75,7 @@ public BoundSql getBoundSql(Object parameterObject) {
7475
// Add to passed parameterObject our predefined directive - MyBatisParamDirective
7576
// It will be available as "p" inside templates
7677
Object dataContext;
77-
ArrayList generatedParams = new ArrayList<>();
78+
List generatedParams = new ArrayList<>();
7879
if (parameterObject != null) {
7980
if (parameterObject instanceof Map) {
8081
HashMap<String, Object> map = new HashMap<>((Map<String, Object>) parameterObject);

src/main/java/org/mybatis/scripting/freemarker/ParamObjectAdapter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2022 the original author or authors.
2+
* Copyright 2015-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,8 +15,8 @@
1515
*/
1616
package org.mybatis.scripting.freemarker;
1717

18-
import java.util.ArrayList;
1918
import java.util.HashMap;
19+
import java.util.List;
2020

2121
import freemarker.ext.beans.BeanModel;
2222
import freemarker.ext.beans.BeansWrapperBuilder;
@@ -33,10 +33,10 @@
3333
*/
3434
public class ParamObjectAdapter implements TemplateHashModel {
3535
private final BeanModel beanModel;
36-
private final ArrayList generatedParams;
36+
private final List generatedParams;
3737
private HashMap<String, TemplateModel> additionalParams;
3838

39-
public ParamObjectAdapter(Object paramObject, ArrayList generatedParams, Version incompatibleImprovementsVersion) {
39+
public ParamObjectAdapter(Object paramObject, List generatedParams, Version incompatibleImprovementsVersion) {
4040
beanModel = new BeanModel(paramObject, new BeansWrapperBuilder(incompatibleImprovementsVersion).build());
4141
this.generatedParams = generatedParams;
4242
}
@@ -52,7 +52,7 @@ public void putAdditionalParam(String key, TemplateModel value) {
5252
additionalParams.put(key, value);
5353
}
5454

55-
public ArrayList getGeneratedParams() {
55+
public List getGeneratedParams() {
5656
return generatedParams;
5757
}
5858

0 commit comments

Comments
 (0)