"John Keiser" <[EMAIL PROTECTED]> writes:

>      One more thing I need from the Float/Double person[s]: where
> (and how) can spaces be in the input string, and what happens when
> an unrecognized character is hit?  Is a NumberFormatException
> thrown, or is the rest of the string simply ignored?

NumberFormatException should be thrown.  All of this behavior is
documented in the JLS.

> And I'm still missing documentation for those WIDEFP_* fields in
> Float.

They're explained in the strictfp documentation.

> Double.Double(String), Float.Float(String), Double.valueOf(String),
> and Float.valueOf(String) all explicitly declared that they threw
> NullPointerException.

All of those methods *should* explicitly declare that they throw
NullPointerExceptions.  A NullPointerException is a subclass of
RuntimeException and as such, there's no requirement to put it in the
throws clause -- and Sun often leaves it out.  However, it makes
things clearer to know that if you pass in a null, you're going to get
a NullPointerException back and not a NumberFormatException.

This behaviour is clearly documented in the JLS.

-- 
Paul Fisher * [EMAIL PROTECTED]

Reply via email to