stillalex commented on PR #1127:
URL: https://github.com/apache/solr/pull/1127#issuecomment-1291056422
There is some code in the Aliases class I don't get:
```
public static Map<String, List<String>>
convertMapOfCommaDelimitedToMapOfList(
Map<String, String> collectionAliasMap) {
return collectionAliasMap.entrySet().stream()
.collect(
Collectors.toMap(
Map.Entry::getKey,
e -> splitCollections(e.getValue()),
(a, b) -> {
throw new IllegalStateException(
String.format(Locale.ROOT, "Duplicate key %s", b));
},
LinkedHashMap::new));
}
```
if the starting point for the stream is a `Map<>`, the 'merge keys' part
where it checks for collisions`(a, b) -> IllegalStateException` would never be
possible, as the keys are already guaranteed to be unique by the map contract.
am I reading this wrong?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]