commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34098] - [configuration] Inconsistent handling for keys that don't exist
Date Mon, 21 Mar 2005 15:35:04 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34098>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34098





------- Additional Comments From ittayd@qlusters.com  2005-03-21 16:35 -------
my point is that as a user, i need to go to the javadoc every time i use a 
getXXX() method, to know what they are doing. some i need to wrap with 'catch', 
some i need to check for nullity, some i need to check for size(). i can't code 
in eclipse, completing the methods as I type and be sure of how they behave.

about throwing an exception. as you've mentioned in getShort() you must throw an 
exception. then why not throw it always? this will have the benefit of allowing 
a user to set a property to null if he wishes. if that user wishes not to get an 
exception, the rule is simple: use getProperty(key, null). in fact, i would 
discourage the usage of getXXX(key) methods, maybe even removing them 
altogether. the best approach is to always have the client tell you what the 
default value is, rather than guessing it.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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