commons-dev 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-78) [configuration] Inconsistent handling for keys that don't exist
Date Mon, 08 Jan 2007 20:43:27 GMT

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

Oliver Heger updated CONFIGURATION-78:
--------------------------------------

    Fix Version/s: 2.0

Because such a change would affect existing code it should be made only in a major release.

> [configuration] Inconsistent handling for keys that don't exist
> ---------------------------------------------------------------
>
>                 Key: CONFIGURATION-78
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-78
>             Project: Commons Configuration
>          Issue Type: Bug
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Ittay Dror
>             Fix For: 2.0
>
>
> The getXXX(String key) methods in AbstractConfiguration are not consistent in 
> how they handle non-existing keys:
> getProperty(String key) - returns null
> getString(String key) - throws an exception if isThrowExceptionOnMissing is true
> getShort(String key) - throws an exception
> getStringArray(String key) - returns an empty array (why not null?)
> etc.
> I suggest that all these methods (include getProperty()) will check 
> isThrowExceptionOnMissing and if true, throw an exception.
> As it is, it makes it hard to extend this class, and use Configuration in 
> general.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message