dcapwell commented on code in PR #103:
URL: https://github.com/apache/cassandra-accord/pull/103#discussion_r1674891040


##########
accord-core/src/test/java/accord/utils/Gens.java:
##########
@@ -117,6 +119,8 @@ public static <T> Gen<T> pick(Map<T, Integer> values)
         // this method relies on the map having some order and will reject any 
map that doesn't define a deterministic order
         if (!(values instanceof EnumMap || values instanceof LinkedHashMap))
             throw new IllegalArgumentException("pick(Map) requires a map with 
deterministic iteration; given " + values.getClass());
+        if (values.size() == 1)

Review Comment:
   not required but saw it was a common case, so good to optimize



-- 
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]

Reply via email to