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

java.lang.Bignum constructor(long) works wrong with Long.MIN_VALUE

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.5
    • Not verified

      new java.lang.Bignum(Long.MIN_VALUE) creates Bignum object
      with value -1237940030062008238044348416 instead of -9223372036854775808

      Minimized test demonstrating the bug:

       class java_lang_Bignum_constructor_2 {
        public static void main(String args[]) {
          System.out.println(new java.lang.Bignum(Long.MIN_VALUE));
          // will print "-1237940030062008238044348416"
          // instead of "-9223372036854775808"
        }
      }

            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: