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

j.u.r.RandomGeneratorFactor.create(long|byte[]) should throw rather than silently fallback to no-arg create()

XMLWordPrintable

    • b24
    • Verified

      Methods RandomGeneratorFactory.create(long) and create(byte[]) silently fallback to the no-arg create() method if the underlying algorithm does not support an explicit long or byte[] seed.
      Since the caller is not notified whether the fallback happens, it is at the mercy of the underlying algorithm implementation.

      The methods above should throw an `UnsupportedOperationException` rather than silently fallback.

            rgiulietti Raffaello Giulietti
            rgiulietti Raffaello Giulietti
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: