commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CONFIGURATION-422) Configuration.getInt() should define its accepted inputs, and should also accept octal
Date Thu, 24 Mar 2016 20:13:26 GMT

     [ https://issues.apache.org/jira/browse/CONFIGURATION-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oliver Heger updated CONFIGURATION-422:
---------------------------------------
    Fix Version/s:     (was: 2.0)
                   2.x

> Configuration.getInt() should define its accepted inputs, and should also accept octal
> --------------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-422
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-422
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: Type conversion
>            Reporter: david cogen
>            Priority: Minor
>             Fix For: 2.x
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message