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

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

XMLWordPrintable

    • 1.2beta3
    • generic
    • generic
    • Not verified

      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)

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: