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

java.lang.Bignum.toString(int radix) works wrong when radix is outside bounds

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.1
    • CPU:
      sparc
    • OS:
      solaris_2.5
    • Verification:
      Not verified

      Description

      This method should throw IllegalArgumentException but:
      - throws ArithmeticException for radix=0
      - hangs for radix=1 or radix<0
      - returns empty string for radix>Character.MAX_RADIX
       
      ==== For example: the following program hangs ====
      import java.lang.Bignum;
      class java_lang_Bignum_toString {
        public static void main(String args[]) {
           Bignum b=new Bignum(1);
           System.out.println(b.toString(1));
        }
      }

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: