Text recommending against calling 'new SecureRandom()' should be removed

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 6
    • Affects Version/s: 6
    • Component/s: security-libs
    • b65
    • generic
    • generic

      The JavaDoc for the SecureRandom() constructor contains the following text: "This constructor is provided for backwards compatibility. The caller is encouraged to use one of the alternative getInstance methods to obtain a SecureRandom object."

      There is no good reason for this recommendation. In fact, it is often preferable to call "new SecureRandom()" because it automatically chooses the default SecureRandom implementation for the platform. This is not possible by calling getInstance(), which requires the algorithm type to be explicitly specified.

            Assignee:
            Andreas Sterbenz
            Reporter:
            Andreas Sterbenz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: