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

setMaximumIntegerDigits(int) specs unclear about range of input parameter

XMLWordPrintable

    • 1.2fcs
    • sparc
    • solaris_2.5
    • Verified



      Name: dfC67450 Date: 09/01/98



      Javadoc says nothing about range of MaximumIntegerDigits value.
      This range changes from version to version.

      Here is the test demonstrating the bug:

      -----------------Test.java------------------------
      import java.text.*;

      public class Test {

        public static void main(String args[]) {
          NumberFormat nf = NumberFormat.getInstance();
          nf.setMaximumIntegerDigits(1000);
          nf.getMaximumIntegerDigits();
          System.out.println("getMaximumIntegerDigits: " +
                                nf.getMaximumIntegerDigits());
        }
          
      }
      ---------Output from the test (jdk1.2-fcs-H) ---------------------
      getMaximumIntegerDigits: 309
      ---------Output from the test (jdk1.2-fcs-G) ---------------------
      getMaximumIntegerDigits: 308
      ---------Output from the test (jdk1.1.6) ---------------------
      getMaximumIntegerDigits: 52
      -------------------------------------------------



      ======================================================================

            aliusunw Alan Liu (Inactive)
            dfazunensunw Dmitri Fazunenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: