Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8324648

Avoid NoSuchMethodError when instantiating NativePRNG

    XMLWordPrintable

Details

    Backports

      Description

        A typical call to `new SecureRandom()` is slowed down by looking for a constructor in NativePRNG which takes `java.security.SecureRandomParameters`. NativePRNG does not have such a constructor, so the search fails, incurring all the cost of the lookup and creating a subsequent exception.

        Creating a dummy constructor which takes and ignores this parameter will speed up `new SecureRandom()` calls significantly.

        Attachments

          Issue Links

            Activity

              People

                ogillespie Oli Gillespie
                ogillespie Oli Gillespie
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: