Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0
-
None
Description
When configuring the regions of a provider using the context properties, if there are no specific endpoints for each region, the following exception is thrown:
Multiple entries with same value: <regionId1>=<endpoint> and <regionId2>=<endpoint> java.lang.IllegalArgumentException at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:150) at com.google.common.collect.RegularImmutableBiMap.<init>(RegularImmutableBiMap.java:131) at com.google.common.collect.ImmutableBiMap.copyOf(ImmutableBiMap.java:210) at org.jclouds.suppliers.SupplyKeyMatchingValueOrNull.get(SupplyKeyMatchingValueOrNull.java:53)
This is caused by the use of a Guava BiMap in the SupplyKeyMatchingValueOrNull, which enforces unique keys and values.
The implementation should be changed to allow regions being configured in the context properties.