bug-classpath
[Top][All Lists]
Advanced

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

[Bug classpath/22834] [regression] locales


From: gcc-bugzilla at gcc dot gnu dot org
Subject: [Bug classpath/22834] [regression] locales
Date: 16 Oct 2005 01:27:23 -0000

Since 0.13 (jamvm 1.2.3) I get a nullpointer on the following line:

DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG).format(new
Date());

this is the stacktrace:
java.lang.NullPointerException
   at java.text.DecimalFormatSymbols.setCurrency
(DecimalFormatSymbols.java:397)
   at java.text.DecimalFormatSymbols.<init> (DecimalFormatSymbols.java:151)
   at java.text.NumberFormat.computeInstance (NumberFormat.java:327)
   at java.text.NumberFormat.getNumberInstance (NumberFormat.java:456)
   at java.text.NumberFormat.getInstance (NumberFormat.java:381)
   at java.text.SimpleDateFormat.<init> (SimpleDateFormat.java:218)
   at java.text.DateFormat.computeInstance (DateFormat.java:407)
   at java.text.DateFormat.getDateTimeInstance (DateFormat.java:485)
   at java.text.DateFormat.getDateTimeInstance (DateFormat.java:469)
   at gnu.testlet.runner.HTMLGenerator.createReport (HTMLGenerator.java:56)


Note that my classes (and thus the above line) are compiled using javac from
Sun.


------- Comment #1 from from-classpath at savannah dot gnu dot org  2005-01-11 
10:34 -------
Yes, I was already halfway through fixing this one before I saw this bug
report.  The exception should be caught by the DecimalFormatSymbols instance,
and I'm currently testing a patch for this.

What is your default locale?  The reason this exception is being thrown is
because there is no currency data that can be retrieved for the default locale.


------- Comment #2 from from-classpath at savannah dot gnu dot org  2005-01-11 
13:06 -------
I have none set (use KDE/debian in default langage, and did not pass any to
jamvm).
I think its C, but if you can tell me how I can find out; I'll tell you what
the output it :)

Thomas Zander


------- Comment #3 from from-classpath at savannah dot gnu dot org  2005-01-11 
16:17 -------
System.out.println(Locale.getDefault()) should do it in a simple test class. 
I'm committing a fix now which sorts out the NPE.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22834





reply via email to

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