RFR: 8279598: Provide adapter from RandomGenerator to Random [v19]

liach duke at openjdk.java.net
Fri Mar 18 13:13:50 UTC 2022


On Fri, 18 Mar 2022 13:06:12 GMT, jmehrens <duke at openjdk.java.net> wrote:

> > The toString method of both classes do not implement anything so i dont think we should override it, ....
> 
> The inherited implementation is descriptive enough because the the class names are the implementation: https://github.com/openjdk/jdk/tree/master/src/jdk.random/share/classes/jdk/random
> 
> The wrapper would hide this detail without an implementation of toString if I'm understanding it correctly.

you are not expected to inspect a random object by its string. if you want to debug, in the debugger you usually gets hold of the object itself. it's not like a user-oriented exception thrown.

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

PR: https://git.openjdk.java.net/jdk/pull/7001


More information about the core-libs-dev mailing list