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=27747>.
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=27747

[configuration] ClassCastException not thrown by getBoolean()

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |1.0 Final



------- Additional Comments From [EMAIL PROTECTED]  2004-06-13 13:23 -------
I've been pondering this issue this week and I came to the conclusion that
neither a ClassCastException nor an IllegalArgumentException are appropriate.
One of the added value of [configuration] comparing to java.util.Properties or a
Map is its ability to convert transparently, as far as reasonably possible, the
stored properties into the type requested by the user. If this conversion is not
possible, we need an unified exception to inform the user, and not several
exceptions (ClassCastException, NumberFormatException, etc).

I suggest adding a ConversionException, extending a
ConfigurationRuntimeException (or RuntimeConfigurationException ?) and wrapping
the cause that made the conversion to fail.

If no one objects I'm going to implement this change next week.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to