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

java.lang.Bignum.random() doesn't throw an exception when bits < 0

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.5
    • Not verified

      ==== Here is the minimized test demonstrating the bug ====
      import java.lang.Bignum;
      class java_lang_Bignum_random {
        public static void main(String args[]) {
          Bignum b=Bignum.random(-1,new java.util.Random());
          System.out.println(b);
        }
      }
      ==== Here is the example of the test output ====
      65553821

            mhapnersunw Mark Hapner (Inactive)
            mgorshen Mikhail Gorshenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: