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

Add capability to parse char[] to the Number subclasses

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 5.0
    • core-libs
    • sparc
    • solaris_9

      Name: js151677 Date: 08/09/2004


      A DESCRIPTION OF THE REQUEST :
      The subclasses of java.lang.Number have contructors accepting only a primative type or a String. The parse*() methods for the Number subclasses accept only a String.

      When processing
      The subclasses of java.lang.Number should have construcand constructors to parse a value from a char[] at an offset and length within the array.

      When processing XML with the SAX parser one is provided a char() with
      an offset and count for the subject content. If the content is a number it must a String must be instantiated, and then the desired Number subclass instantiated from the string. Often the value is assigned to a base type variable (int, float, etc). The String and Number objects, being temporary, are immediately available for garbage collection.

      In situations were a large volume of numeric data is parsed, the temporary object creation can become an enormous burden on the virtual machine when it is trying to collect the temporary objects.



      JUSTIFICATION :
      This enhancement will reduce the creation of temporary objects during parsing oprtations by eliminating the need to created temporary String and Number objects.
      (Incident Review ID: 296134)
      ======================================================================

            darcy Joe Darcy
            jssunw Jitender S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: