RFR: 8324646: Avoid Class.forName in SecureRandom constructor [v2]

Oli Gillespie ogillespie at openjdk.org
Wed Jan 31 17:38:03 UTC 2024


On Wed, 31 Jan 2024 17:23:42 GMT, Weijun Wang <weijun at openjdk.org> wrote:

> How about just using class literals? There is no need to call `Class.forName`, at least not now since they are all inside `java.base`.

Thanks :). That seems sensible if writing from scratch, but that part I'm just reviving from [JDK-8280970](https://bugs.openjdk.org/browse/JDK-8280970) which is nice for keeping it in sync with 17 for backports. My preference is to keep it close to the original code/17 unless there's a strong reason not to.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17559#issuecomment-1919586911



More information about the security-dev mailing list