classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] Fix For Bug #11545 -- Locale Regression


From: Andrew John Hughes
Subject: Re: [cp-patches] Fix For Bug #11545 -- Locale Regression
Date: Wed, 12 Jan 2005 13:00:22 +0000

On Tue, 2005-01-11 at 23:31, Stephen Crawley wrote:
> address@hidden said:
> > In fact, the documentation for setCurrency() suggests that null is a
> > perfectly valid value for the currency attribute. 
> 
> I'm not sure I'm talking about the right code ... but the JDK 1.5.0
> javadoc for DecimalFormatSymbols.setCurrency(Currency) says that
> a NullPointerException is thrown if the Currency arg is null.
> 
> -- Steve

Sorry, I was writing from memory.  setCurrency() does indeed throw a NPE
with a null argument.  I was referring to getCurrency() which states
that the return value (and thus the stored value) can be null.

'Gets the currency of these DecimalFormatSymbols. May be null if the
currency symbol attribute was previously set to a value that's not a
valid ISO 4217 currency code. 

        Returns:
                the currency used, or null'
                
I can't see any documentation specifying that a value of "XXX" should be
used anywhere.  But, as I say, this is my personal opinion, so I'm open
to argument if anyone thinks we should be following Sun's way of doing
things.
-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

No software patents in Europe -- http://nosoftwarepatents.com

"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman

"We've all been part of the biggest beta test the world has ever known --
Windows"
-- Victor Wheatman, Gartner

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]