Integer.parseInteger incorrectly accepts "-"

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.0
    • Component/s: hotspot
    • None
    • sparc
    • solaris_1

      The call Integer.parseInt("-", 10) incorrectly returns 0.
      It should throw a NumberFormatException.

      There is a similar problem with Long.parseLong("-", 10).

            Assignee:
            Frank Yellin (Inactive)
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: