Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 91701 invoked from network); 28 Mar 2004 15:18:18 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 28 Mar 2004 15:18:18 -0000 Received: (qmail 78729 invoked by uid 500); 28 Mar 2004 15:18:10 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 78667 invoked by uid 500); 28 Mar 2004 15:18:09 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 78653 invoked from network); 28 Mar 2004 15:18:09 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 28 Mar 2004 15:18:09 -0000 Received: (qmail 8402 invoked by uid 50); 28 Mar 2004 15:18:48 -0000 Date: 28 Mar 2004 15:18:48 -0000 Message-ID: <20040328151848.8399.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 27747] - [configuration] ClassCastException not thrown by getBoolean() X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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() ------- Additional Comments From epugh@upstate.com 2004-03-28 15:18 ------- Alessio, I think that the correct behavior needs to be either throw the NoSuchElementException if the value is missing, or the ClassCastException if the value can't be casted. However, can you submit a patch that applies this logic to ALL the various methods of AbstractConfiguration, like getDouble, getShort etc? I don't want to have getBoolean operating differently from the others. Also, a unit test would be good to verify which Exception was thrown. Thanks! Eric --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org