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)
======================================================================
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)
======================================================================
- relates to
-
JDK-4951621 change parameter type from String to CharSequence in numeric parse methods
-
- Closed
-