On Fri, 25 Feb 2022 23:05:48 GMT, Marcono1234 <d...@openjdk.java.net> wrote:
>> Yasser Bazzi has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use var instead of ArrayList raw >> >> Co-authored-by: liach <7806504+li...@users.noreply.github.com> > > src/java.base/share/classes/java/util/Random.java line 93: > >> 91: >> 92: @SuppressWarnings("serial") >> 93: private static class RandomWrapper extends Random implements >> RandomGenerator { > > Isn't ` implements RandomGenerator` redundant because `Random` already > implements `RandomGenerator`? I prefered to keep the interface explicit to the reader > src/java.base/share/classes/java/util/Random.java line 107: > >> 105: return rand; >> 106: >> 107: return (Random) new Random.RandomWrapper(random); > > Isn't the `(Random)` cast redundant? Eclipse did not complain about it being redundant, also it does not impact the reading of it and it shows the reader it is a Random instance that is returning ------------- PR: https://git.openjdk.java.net/jdk/pull/7001