Skip to content

Commit d6509f0

Browse files
Pearl1594Pearl Dsilva
andauthored
API discovery: Prevent overwrite of API parameters in case the API names are the same (#4609)
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
1 parent de7b131 commit d6509f0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.util.ArrayList;
2121
import java.util.HashMap;
2222
import java.util.HashSet;
23+
import java.util.LinkedHashSet;
2324
import java.util.List;
2425
import java.util.Map;
2526
import java.util.Set;
@@ -67,7 +68,7 @@ public boolean start() {
6768
if (s_apiNameDiscoveryResponseMap == null) {
6869
long startTime = System.nanoTime();
6970
s_apiNameDiscoveryResponseMap = new HashMap<String, ApiDiscoveryResponse>();
70-
Set<Class<?>> cmdClasses = new HashSet<Class<?>>();
71+
Set<Class<?>> cmdClasses = new LinkedHashSet<Class<?>>();
7172
for (PluggableService service : _services) {
7273
s_logger.debug(String.format("getting api commands of service: %s", service.getClass().getName()));
7374
cmdClasses.addAll(service.getCommands());

0 commit comments

Comments
 (0)