Skip to content

Fix method to use 'list' rather than 'arraylist' #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .mvn/settings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2015-2024 the original author or authors.
Copyright 2015-2025 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.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2015-2024 the original author or authors.
Copyright 2015-2025 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2023 the original author or authors.
* Copyright 2015-2025 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.
Expand Down Expand Up @@ -387,8 +387,7 @@ private static void override(FreeMarkerLanguageDriverConfig config, Properties p
MetaObject metaObject = MetaObject.forObject(config, new DefaultObjectFactory(), new DefaultObjectWrapperFactory(),
new DefaultReflectorFactory());
properties.forEach((key, value) -> {
String propertyPath = WordUtils
.uncapitalize(WordUtils.capitalize(Objects.toString(key), '-').replace("-", ""));
String propertyPath = WordUtils.uncapitalize(WordUtils.capitalize(Objects.toString(key), '-').replace("-", ""));
Optional.ofNullable(value).ifPresent(v -> {
Object convertedValue = TYPE_CONVERTERS.get(metaObject.getSetterType(propertyPath)).apply(value.toString());
metaObject.setValue(propertyPath, convertedValue);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2023 the original author or authors.
* Copyright 2015-2025 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.
Expand All @@ -19,6 +19,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.builder.SqlSourceBuilder;
Expand Down Expand Up @@ -74,7 +75,7 @@ public BoundSql getBoundSql(Object parameterObject) {
// Add to passed parameterObject our predefined directive - MyBatisParamDirective
// It will be available as "p" inside templates
Object dataContext;
ArrayList generatedParams = new ArrayList<>();
List generatedParams = new ArrayList<>();
if (parameterObject != null) {
if (parameterObject instanceof Map) {
HashMap<String, Object> map = new HashMap<>((Map<String, Object>) parameterObject);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2022 the original author or authors.
* Copyright 2015-2025 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.
Expand All @@ -15,8 +15,8 @@
*/
package org.mybatis.scripting.freemarker;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import freemarker.ext.beans.BeanModel;
import freemarker.ext.beans.BeansWrapperBuilder;
Expand All @@ -33,10 +33,10 @@
*/
public class ParamObjectAdapter implements TemplateHashModel {
private final BeanModel beanModel;
private final ArrayList generatedParams;
private final List generatedParams;
private HashMap<String, TemplateModel> additionalParams;

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

public ArrayList getGeneratedParams() {
public List getGeneratedParams() {
return generatedParams;
}

Expand Down