On Tue, 14 May 2024 15:40:24 GMT, ExE Boss <d...@openjdk.org> wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Move mathematical logic to record RandomGeneratorProperties. > > src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java line > 202: > >> 200: int i, int j, int k, int equidistribution, >> 201: int flags) { >> 202: return new SimpleImmutableEntry<>(name, > > This should use [`Map.Entry<…>`] as the return type, which in turn allows > using [`Map::entry(K, V)`] as the implementation, as neither the `name` > key, nor the value is ever `null`: > Suggestion: > > private static Map.Entry<String, RandomGeneratorProperties> > entry(Class<? extends RandomGenerator> rgClass, String name, String > group, > int i, int j, int k, int equidistribution, > int flags) { > return Map.entry(name, > > > [`Map.Entry<…>`]: > https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/Map.Entry.html > [`Map::entry(K, V)`]: > https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/Map.html#entry(K,V)
@ExE-Boss Thanks for the suggestion. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19212#discussion_r1600303960