This is an automated email from the ASF dual-hosted git repository.
liuhongyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new e99fb7d5b9 fix ListUtil->merge exception (#5642)
e99fb7d5b9 is described below
commit e99fb7d5b9df4e597cd92f4c6358cc4554d5a679
Author: xiangqianZ <[email protected]>
AuthorDate: Sat Aug 31 15:12:57 2024 +0800
fix ListUtil->merge exception (#5642)
---
.../src/main/java/org/apache/shenyu/common/utils/ListUtil.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/shenyu-common/src/main/java/org/apache/shenyu/common/utils/ListUtil.java
b/shenyu-common/src/main/java/org/apache/shenyu/common/utils/ListUtil.java
index ba23cfda81..0dc0390bc0 100644
--- a/shenyu-common/src/main/java/org/apache/shenyu/common/utils/ListUtil.java
+++ b/shenyu-common/src/main/java/org/apache/shenyu/common/utils/ListUtil.java
@@ -18,6 +18,7 @@
package org.apache.shenyu.common.utils;
import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.ListUtils;
import java.util.Collection;
import java.util.Collections;
@@ -185,8 +186,7 @@ public final class ListUtil {
* @return list1
*/
public static <T> List<T> merge(final List<T> list1, final List<T> list2) {
- list1.addAll(list2);
- return list1;
+ return ListUtils.union(list1, list2);
}
/**