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

Add SplittableRandom.nextBytes

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 10
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      None. This is a new method on a final class.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Add SplittableRandom.nextBytes(byte[]).

      Problem

      java.util.Random has a nextBytes method, and SplittableRandom implements most Random methods, but nextBytes was missed.

      Solution

      Implement nextBytes in the obvious way.

      Specification

          /**
           * Fills a user-supplied byte array with generated pseudorandom bytes.
           *
           * @param  bytes the byte array to fill with pseudorandom bytes
           * @throws NullPointerException if bytes is null
           * @since  10
           */
          public void nextBytes(byte[] bytes) {

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              martin Martin Buchholz
              Reporter:
              martin Martin Buchholz
              Reviewed By:
              Doug Lea, Paul Sandoz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: