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

java.lang.Bignum constructor(int) works wrong with Integer.MIN_VALUE

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.5
    • Not verified

      new java.lang.Bignum(Integer.MIN_VALUE) creates Bignum object
      with value -1152921502459363328 instead of -21474483648

      Minimized test demonstrating the bug:

      class java_lang_Bignum_constructor_1 {
        public static void main(String args[]) {
          System.out.println(new java.lang.Bignum(Integer.MIN_VALUE));
          // will print "-1152921502459363328" instead of "-21474483648"
        }
      }

            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: