Looly 5 years ago
parent
commit
5023657f8c
2 changed files with 3 additions and 2 deletions
  1. 1 0
      CHANGELOG.md
  2. 2 2
      hutool-setting/src/main/java/cn/hutool/setting/GroupedSet.java

+ 1 - 0
CHANGELOG.md

@@ -13,6 +13,7 @@
 * 【core   】     修复BeanUtil.isEmpty不能忽略static字段问题(issue#I1KZI6@Gitee)
 * 【core   】     修复BeanUtil.isEmpty不能忽略static字段问题(issue#I1KZI6@Gitee)
 * 【core   】     修复StrUtil.brief长度问题(pr#930@Github)
 * 【core   】     修复StrUtil.brief长度问题(pr#930@Github)
 * 【socket 】     修复AioSession构造超时无效问题(pr#941@Github)
 * 【socket 】     修复AioSession构造超时无效问题(pr#941@Github)
+* 【setting】     修复GroupSet.contains错误(pr#943@Github)
 
 
 -------------------------------------------------------------------------------------------------------------
 -------------------------------------------------------------------------------------------------------------
 ## 5.3.8 (2020-06-16)
 ## 5.3.8 (2020-06-16)

+ 2 - 2
hutool-setting/src/main/java/cn/hutool/setting/GroupedSet.java

@@ -1,6 +1,7 @@
 package cn.hutool.setting;
 package cn.hutool.setting;
 
 
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.collection.ListUtil;
 import cn.hutool.core.io.IoUtil;
 import cn.hutool.core.io.IoUtil;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.CharsetUtil;
 import cn.hutool.core.util.CharsetUtil;
@@ -13,7 +14,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStream;
 import java.net.URL;
 import java.net.URL;
 import java.nio.charset.Charset;
 import java.nio.charset.Charset;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
 import java.util.LinkedHashSet;
@@ -279,7 +279,7 @@ public class GroupedSet extends HashMap<String, LinkedHashSet<String>> {
 	public boolean contains(String group, String value, String... otherValues) {
 	public boolean contains(String group, String value, String... otherValues) {
 		if (ArrayUtil.isNotEmpty(otherValues)) {
 		if (ArrayUtil.isNotEmpty(otherValues)) {
 			// 需要测试多个值的情况		
 			// 需要测试多个值的情况		
-			final List<String> valueList = new ArrayList<>(Arrays.asList(otherValues));
+			final List<String> valueList = ListUtil.toList(otherValues);
 			valueList.add(value);
 			valueList.add(value);
 			return contains(group, valueList);
 			return contains(group, valueList);
 		} else {
 		} else {