Name: dgC58589 Date: 12/05/97
This code ...
========================================================
import java.text.*;
class BugReport
{ public static void main( String args[] )
{ DecimalFormat df = new DecimalFormat( );
System.out.println( "Result is " +
df.parse( " 1 ", new ParsePosition( 0 ) ) );
try {
System.out.println( "Result is " +
df.parseObject( " 1 2" ) );
}
catch ( Exception e ) {
e.printStackTrace( );
}
}
}
========================================================
results in:
Result is null
java.text.ParseException: Format.parseObject(String) failed
at java.text.Format.parseObject(Compiled Code)
at BugReport.main(Compiled Code)
========================================================
The documentation for Format states that leading
whitespace will be skipped.
@see java.text.Format.html#parseObject(java.lang.String, java.text.ParsePosition)
(Review ID: 21376)
======================================================================