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

Semantics of Format.parseObject(String source) not well-defined

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.8
    • core-libs
    • generic
    • generic



      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)
      ======================================================================

            nlindenbsunw Norbert Lindenberg (Inactive)
            vasya Vassili Igouchkine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: