From cc723503852687ffc250dc54a1195fad588db114 Mon Sep 17 00:00:00 2001 From: looly Date: Tue, 30 Nov 2021 17:05:57 +0800 Subject: [PATCH] fix bug --- CHANGELOG.md | 3 ++- .../src/main/java/cn/hutool/core/collection/CollUtil.java | 8 ++++---- .../java/cn/hutool/core/collection/RingIndexUtil.java | 3 ++- .../main/java/cn/hutool/http/webservice/SoapClient.java | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d5d59309..134d92018 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ------------------------------------------------------------------------------------------------------------- -# 5.7.17 (2021-11-29) +# 5.7.17 (2021-11-30) ### 🐣新特性 * 【core 】 增加AsyncUtil(pr#457@Gitee) @@ -36,6 +36,7 @@ * 【core 】 修复ZipUtil相对路径父路径获取null问题(issue#1961@Github) * 【http 】 修复HttpUtil.normalizeParams未判空导致的问题(issue#1975@Github) * 【poi 】 修复读取日期类型的自定义样式单元格时间结果为1899年问题(pr#1977@Github) +* 【poi 】 修复SoapClient参数未使用问题 ------------------------------------------------------------------------------------------------------------- diff --git a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java b/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java index fb6783402..94f4d357c 100644 --- a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java +++ b/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java @@ -1299,14 +1299,14 @@ public class CollUtil { * @param 集合元素类型 * @param resultCollection 存放移除结果的集合 * @param targetCollection 被操作移除元素的集合 - * @param filter 用于是否移除判断的过滤器 + * @param predicate 用于是否移除判断的过滤器 */ - public static , E> T removeWithAddIf(T targetCollection, T resultCollection, Predicate filter) { - Objects.requireNonNull(filter); + public static , E> T removeWithAddIf(T targetCollection, T resultCollection, Predicate predicate) { + Objects.requireNonNull(predicate); final Iterator each = targetCollection.iterator(); while (each.hasNext()) { E next = each.next(); - if (filter.test(next)) { + if (predicate.test(next)) { resultCollection.add(next); each.remove(); } diff --git a/hutool-core/src/main/java/cn/hutool/core/collection/RingIndexUtil.java b/hutool-core/src/main/java/cn/hutool/core/collection/RingIndexUtil.java index b997b1428..34fd8c738 100644 --- a/hutool-core/src/main/java/cn/hutool/core/collection/RingIndexUtil.java +++ b/hutool-core/src/main/java/cn/hutool/core/collection/RingIndexUtil.java @@ -56,7 +56,8 @@ public class RingIndexUtil { } /** - * 通过cas操作 实现对指定值内的回环累加 + * 通过cas操作 实现对指定值内的回环累加
+ * 此方法一般用于大量数据完成回环累加(如数据库中的值大于int最大值) * * @param modulo 回环周期值 * @param atomicLong 原子操作类 diff --git a/hutool-http/src/main/java/cn/hutool/http/webservice/SoapClient.java b/hutool-http/src/main/java/cn/hutool/http/webservice/SoapClient.java index 4c892c285..35b155fff 100644 --- a/hutool-http/src/main/java/cn/hutool/http/webservice/SoapClient.java +++ b/hutool-http/src/main/java/cn/hutool/http/webservice/SoapClient.java @@ -338,7 +338,7 @@ public class SoapClient extends HttpBase { */ public SoapClient setMethod(QName name, Map params, boolean useMethodPrefix) { setMethod(name); - final String prefix = name.getPrefix(); + final String prefix = useMethodPrefix ? name.getPrefix() : null; final SOAPBodyElement methodEle = this.methodEle; for (Entry entry : MapUtil.wrap(params)) { setParam(methodEle, entry.getKey(), entry.getValue(), prefix); @@ -618,7 +618,7 @@ public class SoapClient extends HttpBase { * @param ele 方法节点 * @param name 参数名 * @param value 参数值 - * @param prefix 命名空间前缀 + * @param prefix 命名空间前缀, {@code null}表示不使用前缀 * @return {@link SOAPElement}子节点 */ @SuppressWarnings("rawtypes")