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

null parameters for BigInteger constructors causes NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 1.4.0
    • 1.2.0
    • core-libs
    • beta2
    • x86
    • windows_nt
    • Verified



      Name: skT45625 Date: 11/09/2000


      Classic VM (build JDK-1.2.2-001, native threads, symcjit)

      When instantiating a java.math.BigInteger object using:

      BigInteger(int signum, byte[] magnitude)

      or

      BigInteger(String val, int radix)

      constructors and supplying null as a parameter for magnitude
      or val, the constructor throws a NullPointerException.
      I have not tried other constructors, but I suspect the behavior
      is the same.

      My suggestion would be to throw a NumberFormatException, since
      this is within the bounds of already defined behavior (according
      to the javadoc).
      (Review ID: 109239)
      ======================================================================

            shommel Scott Hommel (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: