RFR: 8320759: Creation of random BigIntegers can be made faster [v3]

Raffaello Giulietti rgiulietti at openjdk.org
Wed Dec 6 18:44:41 UTC 2023


On Wed, 6 Dec 2023 15:07:59 GMT, fabioromano1 <duke at openjdk.org> wrote:

>> So, item 1 is a non-issue and item 2 is not likely a problem in practice. What, if anything, will be done about item 3?
>
> @bplb Maybe an assertion at the end of `randomBits(int, Random)` method, or a test class.

@fabioromano1 
As suggested earlier, you might want to take a look [here](https://github.com/openjdk/jdk/blob/master/test/jdk/java/math/BigInteger/ByteArrayConstructorTest.java) to see how the fields can be accessed from your test, preferably JUnit and preferably placing it into that same folder.

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

PR Comment: https://git.openjdk.org/jdk/pull/16817#issuecomment-1843479248


More information about the core-libs-dev mailing list