Skip to content

Commit

Permalink
tiny improve
Browse files Browse the repository at this point in the history
Change-Id: I8a8266d7d618410dcff2e882dcbc71c9d71f66e5
  • Loading branch information
javeme committed Mar 4, 2021
1 parent 988480e commit 3039823
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ public AuthManager authManager() {

private static String excludeSelfUrl(String rpcUrl, String selfUrl) {
String[] urls = StringUtils.splitWithCommaOrSemicolon(rpcUrl);
Set<String> urlsSet = new LinkedHashSet<>(Arrays.asList(urls));
urlsSet.remove(selfUrl);
return String.join(",", urlsSet);
// Keep order via LinkedHashSet
Set<String> urlSet = new LinkedHashSet<>(Arrays.asList(urls));
urlSet.remove(selfUrl);
return String.join(",", urlSet);
}
}

0 comments on commit 3039823

Please sign in to comment.