Skip to content

Commit a90fb6b

Browse files
uucloudnobodyiam
authored andcommitted
fix: ensure clusters order in envclusters openapi
1 parent 0cba391 commit a90fb6b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Apollo 2.4.0
1919
* [Feature: openapi query namespace support not fill item](https://github.com/apolloconfig/apollo/pull/5249)
2020
* [Refactor: align database ClusterName and NamespaceName fields lengths](https://github.com/apolloconfig/apollo/pull/5263)
2121
* [Feature: Added the value length limit function for AppId-level configuration items](https://github.com/apolloconfig/apollo/pull/5264)
22+
* [Fix: ensure clusters order in envClusters open api](https://github.com/apolloconfig/apollo/pull/5277)
2223

2324
------------------
2425
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/15?closed=1)

apollo-common/src/main/java/com/ctrip/framework/apollo/common/utils/BeanUtils.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.util.Collections;
2929
import java.util.HashMap;
3030
import java.util.HashSet;
31+
import java.util.LinkedHashSet;
3132
import java.util.List;
3233
import java.util.Map;
3334
import java.util.Set;
@@ -164,7 +165,7 @@ public static <K, V> Map<K, List<V>> aggByKeyToList(String key, List<?> list) {
164165
*/
165166
@SuppressWarnings("unchecked")
166167
public static <K> Set<K> toPropertySet(String key, List<?> list) {
167-
Set<K> set = new HashSet<>();
168+
Set<K> set = new LinkedHashSet<>();
168169
if (CollectionUtils.isEmpty(list)) {// 防止外面传入空list
169170
return set;
170171
}

0 commit comments

Comments
 (0)