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

BigInteger generates illegal object from "0" in multi-byte code

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2beta3
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description

      BigInteger could not be instanciated with Zenaku(Multi-byte) "0".

      import java.math.*;

      public class into{
              public static void main(String[] arg){
                      BigInteger n = new BigInteger("£±"); <- Zenkaku 1
                      System.out.println(n.toString());
                      BigInteger o = new BigInteger("£°"); <- Zenkaku 0
                      System.out.println(o.toString());
              }
      }

      sishida@stones->java into
      1
      java.lang.ArrayIndexOutOfBoundsException: 0
              at java.math.BigInteger.toString(BigInteger.java:1152)
              at java.math.BigInteger.toString(BigInteger.java:1191)
              at into.main(into.java:8)

        Attachments

          Activity

            People

            Assignee:
            mmcclosksunw Michael Mccloskey (Inactive)
            Reporter:
            sishidasunw Shoji Ishida (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: