commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Pugh" <>
Subject RE: [configuration] Numbers conversions
Date Mon, 14 Jun 2004 08:49:01 GMT
Re: [configuration] Numbers conversionsOh...   Ick...  I guess that while
that is consistent with downcasting in Java, I don't think that it is
consistent with how the Commons Configuration API "feels"..   The api does a
lot to try and convert things for the user..

Do you have a real resistence to the idea of throwing an exception?  If you
like, apply your changes, and then I'll do it..  It just seems to make more

  -----Original Message-----
  From: Emmanuel Bourg []
  Sent: Sunday, June 13, 2004 7:00 PM
  To: Jakarta Commons Developers List
  Subject: Re: [configuration] Numbers conversions

  Eric Pugh wrote:

  > If I put in a really big number and then try to retrieve it as an
  > getting back -1 would be a rather shock!  I think I would rather hit an
  > exception instead, thereby clueing me in that I couldn't downcast...

  Actually it's just consistent with the downcasting in Java:

  ( (int) Long.MAX_VALUE ) == -1

  Emmanuel Bourg

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message