Name: vi73552 Date: 05/25/99
The definition of Format.parseObject(String source): Parses a string to produce an object.
If I use a NumberFormat to parse "12X", it returns the Number 12. Since this method can't tell me whether it parsed the whole string or just a prefix, it should take the more conservative approach of returning success only when the whole string parses.
Leave it to parseObject(String source, ParsePosition status) to handle the more complex (and less common) case of parsing a string that might contain several tokens.
(Review ID: 83460)
======================================================================
- duplicates
-
JDK-4375399 Format.parseObject(String) and parse(String) methods don't parse entire String
-
- Resolved
-