Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-422

Configuration.getInt() should define its accepted inputs, and should also accept octal

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 2.x
    • Type conversion
    • None

    Description

      I can find no information about the format of the string that Configuration.getInt(String) accepts. I have determined by experimentation and examining the source that it accepts decimal integers, and hex integers if preceeded by "0x". This should be explained.

      Also, it is customary for functions which accept decimal and hex to also accept octal. A string with leading "0" should be parsed as octal.

      This should apply to getByte(), getShort(), and getLong() as well.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cogen david cogen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: