public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libgcj/5029: Date.toString() fail when LANG=FR_fr
@ 2002-01-08 13:24 tromey
  0 siblings, 0 replies; 4+ messages in thread
From: tromey @ 2002-01-08 13:24 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, java-prs, michel.chevanne, nobody

Synopsis: Date.toString() fail when LANG=FR_fr

State-Changed-From-To: open->closed
State-Changed-By: tromey
State-Changed-When: Tue Jan  8 13:24:43 2002
State-Changed-Why:
    I looked into this PR again today.
    We've changed how locale handling is done on the cvs trunk.
    Now your test program doesn't crash.
    The fix for this will appear in gcj 3.1.
    Thanks for your report.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5029


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: libgcj/5029: Date.toString() fail when LANG=FR_fr
@ 2001-12-06  7:46 Michel Chevanne
  0 siblings, 0 replies; 4+ messages in thread
From: Michel Chevanne @ 2001-12-06  7:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libgcj/5029; it has been noted by GNATS.

From: Michel Chevanne <michel.chevanne@alcatel.fr>
To: tromey@redhat.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libgcj/5029: Date.toString() fail when LANG=FR_fr
Date: Thu, 06 Dec 2001 16:41:15 +0100

 At 16:27 06/12/01, Tom Tromey wrote:
 > >>>>> "Michel" == michel chevanne <michel.chevanne@alcatel.fr> writes:
 >
 >Michel> When LANG=fr_FR,
 >Michel> [ ... ]
 >
 >Unfortunately no one has written resource files for locales other than
 >en_US.  Our plan is to write a locale compiler like the one in glibc
 >which generates files in the format we want.  However, it hasn't been
 >implemented yet, and I don't know when it will be implemented.
 >
 >Tom
 
 
 I understand that but you could at least rename LocaleData_en.java into 
 LocalDate.java so when
 the right locale is not found it will use default to LocalData.java
 
 I don't bother that everything is written into English, I bother about the 
 NullPointerException.
 
 Michel
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: libgcj/5029: Date.toString() fail when LANG=FR_fr
@ 2001-12-06  7:26 Tom Tromey
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2001-12-06  7:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libgcj/5029; it has been noted by GNATS.

From: Tom Tromey <tromey@redhat.com>
To: michel.chevanne@alcatel.fr
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libgcj/5029: Date.toString() fail when LANG=FR_fr
Date: 06 Dec 2001 08:27:01 -0700

 >>>>> "Michel" == michel chevanne <michel.chevanne@alcatel.fr> writes:
 
 Michel> When LANG=fr_FR, 
 Michel> [ ... ]
 
 Unfortunately no one has written resource files for locales other than
 en_US.  Our plan is to write a locale compiler like the one in glibc
 which generates files in the format we want.  However, it hasn't been
 implemented yet, and I don't know when it will be implemented.
 
 Tom


^ permalink raw reply	[flat|nested] 4+ messages in thread

* libgcj/5029: Date.toString() fail when LANG=FR_fr
@ 2001-12-06  0:56 michel.chevanne
  0 siblings, 0 replies; 4+ messages in thread
From: michel.chevanne @ 2001-12-06  0:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5029
>Category:       libgcj
>Synopsis:       Date.toString() fail when LANG=FR_fr
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 06 00:56:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     michel.chevanne@alcatel.fr
>Release:        gcc 3.0.2
>Organization:
>Environment:
Linux  2.2.18-SMP
Suse Linux 7.1 distribution
>Description:
When LANG=fr_FR, 

date.toString() throw a null pointer exception in
DateFormatSymbols.formatsForKey 
- There is a related problem : LANG=fr_FR is not correctly
parsed (it should correspond to user.language=fr and user.region=FR)
- Workaround : set the language to en/US
>How-To-Repeat:
Test program :


import java.util.*;
public class Test {

    public static void main(String [] args) {
	System.err.println(System.getProperty("user.language"));	
	System.err.println(System.getProperty("user.region"));

	// by default, on my computer, user.language and user.region have these values
	// (because LANG=FR_fr)
	System.setProperty("user.language", "LC");
	System.setProperty("user.region", "CT");

	Date d = new Date();
	System.out.println(d.toString());
    }

}

>Fix:
The exception is thrown because the parameter res is null.
(in DateFormatSymbols.formatForKey)
This parameter is null because the constructor of DateFormatSymbols has not found gnu.gcj.text.LocaleData.
A search in the source code of libjava indicates that :
only the files 
gnu/gcj/text/LocaleData_en.java and
gnu/gcj/text/LocaleData_en_US.java
but not gnu/gcj/text/LocaleData.java which would have
been loaded by default.

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-08 21:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-08 13:24 libgcj/5029: Date.toString() fail when LANG=FR_fr tromey
  -- strict thread matches above, loose matches on Subject: below --
2001-12-06  7:46 Michel Chevanne
2001-12-06  7:26 Tom Tromey
2001-12-06  0:56 michel.chevanne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).