public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
* ResourceBundle variants and child variants
@ 2002-12-07 10:46 Mark Wielaard
  2002-12-09  9:39 ` Andrew Haley
  0 siblings, 1 reply; 12+ messages in thread
From: Mark Wielaard @ 2002-12-07 10:46 UTC (permalink / raw)
  To: mauve-discuss

Hi,

Mauve contains a couple of java.util.ResourceBundle checks that test for
"child variants". The Java Class Libraries, Volume 1, Second Edition
explains these things and gives some examples. e.g
ErrorResources_de_CH_WIN_95 and ErrorResources_de_CH_WIN_311 are both
child variants of ErrorResources_de_CH_WIN. Mauve even contains some
tests to check that these child variants are correctly searched for.

The API Spec as found online however does not talk about child variants
at all. And a quick test against the Sun JDK 1.4.1 implementation seems
to suggest that it does not implement support for these child variants.

Which specification should we take as normative?
Do the different class libraries implementations implement it?
(GNU Classpath and libgcj don't support them, kaffe does.)
Should these tests be removed from Mauve?

Cheers,

Mark

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

* ResourceBundle variants and child variants
  2002-12-07 10:46 ResourceBundle variants and child variants Mark Wielaard
@ 2002-12-09  9:39 ` Andrew Haley
  2002-12-09 10:34   ` Mark Wielaard
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Haley @ 2002-12-09  9:39 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: mauve-discuss

Mark Wielaard writes:
 > Mauve contains a couple of java.util.ResourceBundle checks that test for
 > "child variants". The Java Class Libraries, Volume 1, Second Edition
 > explains these things and gives some examples. e.g
 > ErrorResources_de_CH_WIN_95 and ErrorResources_de_CH_WIN_311 are both
 > child variants of ErrorResources_de_CH_WIN. Mauve even contains some
 > tests to check that these child variants are correctly searched for.
 > 
 > The API Spec as found online however does not talk about child variants
 > at all. And a quick test against the Sun JDK 1.4.1 implementation seems
 > to suggest that it does not implement support for these child variants.
 > 
 > Which specification should we take as normative?
 > Do the different class libraries implementations implement it?
 > (GNU Classpath and libgcj don't support them, kaffe does.)
 > Should these tests be removed from Mauve?

I would think so.  There's no way that Mauve should be testing
anything outside the specifications.

Andrew.

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

* Re: ResourceBundle variants and child variants
  2002-12-09  9:39 ` Andrew Haley
@ 2002-12-09 10:34   ` Mark Wielaard
  2002-12-09 10:38     ` Andrew Haley
  2002-12-10  8:45     ` Dalibor Topic
  0 siblings, 2 replies; 12+ messages in thread
From: Mark Wielaard @ 2002-12-09 10:34 UTC (permalink / raw)
  To: Andrew Haley; +Cc: mauve-discuss

Hi,

On Mon, 2002-12-09 at 12:27, Andrew Haley wrote:
> Mark Wielaard writes:
>  > Mauve contains a couple of java.util.ResourceBundle checks that test for
>  > "child variants". The Java Class Libraries, Volume 1, Second Edition
>  > explains these things and gives some examples. e.g
>  > ErrorResources_de_CH_WIN_95 and ErrorResources_de_CH_WIN_311 are both
>  > child variants of ErrorResources_de_CH_WIN. Mauve even contains some
>  > tests to check that these child variants are correctly searched for.
>  > 
>  > The API Spec as found online however does not talk about child variants
>  > at all. And a quick test against the Sun JDK 1.4.1 implementation seems
>  > to suggest that it does not implement support for these child variants.
>  > 
>  > Which specification should we take as normative?
>  > Do the different class libraries implementations implement it?
>  > (GNU Classpath and libgcj don't support them, kaffe does.)
>  > Should these tests be removed from Mauve?
> 
> I would think so.  There's no way that Mauve should be testing
> anything outside the specifications.

But the question is, what is considered The Specification?
I use The Java Class Libraries books a lot when implementing classes.
And since it describes the child variants it could also be argued that
the online API doc (and most implementations except for Kaffe) is
flawed.

Cheers,

Mark

P.S. The Java Class Libraries supplemental does not cover the 1.2
changes to ResourceBundle :{

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

* Re: ResourceBundle variants and child variants
  2002-12-09 10:34   ` Mark Wielaard
@ 2002-12-09 10:38     ` Andrew Haley
  2002-12-09 11:10       ` Mark Wielaard
  2002-12-10  8:45     ` Dalibor Topic
  1 sibling, 1 reply; 12+ messages in thread
From: Andrew Haley @ 2002-12-09 10:38 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: mauve-discuss

Mark Wielaard writes:
 > Hi,
 > 
 > On Mon, 2002-12-09 at 12:27, Andrew Haley wrote:
 > > Mark Wielaard writes:
 > >  > Mauve contains a couple of java.util.ResourceBundle checks that test for
 > >  > "child variants". The Java Class Libraries, Volume 1, Second Edition
 > >  > explains these things and gives some examples. e.g
 > >  > ErrorResources_de_CH_WIN_95 and ErrorResources_de_CH_WIN_311 are both
 > >  > child variants of ErrorResources_de_CH_WIN. Mauve even contains some
 > >  > tests to check that these child variants are correctly searched for.
 > >  > 
 > >  > The API Spec as found online however does not talk about child variants
 > >  > at all. And a quick test against the Sun JDK 1.4.1 implementation seems
 > >  > to suggest that it does not implement support for these child variants.
 > >  > 
 > >  > Which specification should we take as normative?
 > >  > Do the different class libraries implementations implement it?
 > >  > (GNU Classpath and libgcj don't support them, kaffe does.)
 > >  > Should these tests be removed from Mauve?
 > > 
 > > I would think so.  There's no way that Mauve should be testing
 > > anything outside the specifications.
 > 
 > But the question is, what is considered The Specification?
 > I use The Java Class Libraries books a lot when implementing classes.
 > And since it describes the child variants it could also be argued that
 > the online API doc (and most implementations except for Kaffe) is
 > flawed.

What version of Java is The Java Class Libraries, Volume 1, Second
Edition supposed to document?

Andrew.

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

* Re: ResourceBundle variants and child variants
  2002-12-09 10:38     ` Andrew Haley
@ 2002-12-09 11:10       ` Mark Wielaard
  2002-12-10  3:03         ` Andrew Haley
  0 siblings, 1 reply; 12+ messages in thread
From: Mark Wielaard @ 2002-12-09 11:10 UTC (permalink / raw)
  To: Andrew Haley; +Cc: mauve-discuss

Hi,

On Mon, 2002-12-09 at 19:38, Andrew Haley wrote:
> Mark Wielaard writes:
>  > But the question is, what is considered The Specification?
>  > I use The Java Class Libraries books a lot when implementing classes.
>  > And since it describes the child variants it could also be argued that
>  > the online API doc (and most implementations except for Kaffe) is
>  > flawed.
> 
> What version of Java is The Java Class Libraries, Volume 1, Second
> Edition supposed to document?

The 1.1 version of the Class libraries. The Supplemental gives that
changes for 1.2.

Cheers,

Mark

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

* Re: ResourceBundle variants and child variants
  2002-12-09 11:10       ` Mark Wielaard
@ 2002-12-10  3:03         ` Andrew Haley
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Haley @ 2002-12-10  3:03 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: mauve-discuss

Mark Wielaard writes:
 > Hi,
 > 
 > On Mon, 2002-12-09 at 19:38, Andrew Haley wrote:
 > > Mark Wielaard writes:
 > >  > But the question is, what is considered The Specification?
 > >  > I use The Java Class Libraries books a lot when implementing classes.
 > >  > And since it describes the child variants it could also be argued that
 > >  > the online API doc (and most implementations except for Kaffe) is
 > >  > flawed.
 > > 
 > > What version of Java is The Java Class Libraries, Volume 1, Second
 > > Edition supposed to document?
 > 
 > The 1.1 version of the Class libraries. The Supplemental gives that
 > changes for 1.2.

Right, so the child variants haven't been mentioned in any 1.3 or 1.4 spec?

If so, that's a slam-dunk, IMO.

Andrew.

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

* Re: ResourceBundle variants and child variants
  2002-12-09 10:34   ` Mark Wielaard
  2002-12-09 10:38     ` Andrew Haley
@ 2002-12-10  8:45     ` Dalibor Topic
  2002-12-10 12:23       ` Mark Wielaard
  1 sibling, 1 reply; 12+ messages in thread
From: Dalibor Topic @ 2002-12-10  8:45 UTC (permalink / raw)
  To: Mark Wielaard, Andrew Haley; +Cc: mauve-discuss


--- Mark Wielaard <mark@klomp.org> wrote:
> Hi,
> 
> On Mon, 2002-12-09 at 12:27, Andrew Haley wrote:
> > Mark Wielaard writes:
> >  > Mauve contains a couple of
> java.util.ResourceBundle checks that test for
> >  > "child variants". The Java Class Libraries,
> Volume 1, Second Edition
> >  > explains these things and gives some examples.
> e.g
> >  > ErrorResources_de_CH_WIN_95 and
> ErrorResources_de_CH_WIN_311 are both
> >  > child variants of ErrorResources_de_CH_WIN.
> Mauve even contains some
> >  > tests to check that these child variants are
> correctly searched for.
> >  > 
> >  > The API Spec as found online however does not
> talk about child variants
> >  > at all. And a quick test against the Sun JDK
> 1.4.1 implementation seems
> >  > to suggest that it does not implement support
> for these child variants.
> >  > 
> >  > Which specification should we take as
> normative?
> >  > Do the different class libraries
> implementations implement it?
> >  > (GNU Classpath and libgcj don't support them,
> kaffe does.)
> >  > Should these tests be removed from Mauve?
> > 
> > I would think so.  There's no way that Mauve
> should be testing
> > anything outside the specifications.
> 
> But the question is, what is considered The
> Specification?
> I use The Java Class Libraries books a lot when
> implementing classes.
> And since it describes the child variants it could
> also be argued that
> the online API doc (and most implementations except
> for Kaffe) is
> flawed.

I think I remember the time when there were child
variants for *Locales* in wide useage in the EU, due
to pending conversion to a new currency. de_DE_EURO
anyone? 

I don't know if that means anything to ResourceBundle
support, but I'd expect it to match Locale's rules for
resolution. I think one of the examples for Locale in
Java Class Libraries 2n Ed Volume 1 mentions a
norwegian Locale with the child variant "bookmal".

As I understand the spec for Locale, it says "Where
there are two variants, separate them with an
underscore, and put the most important one first." ,
so it is possible to have child variants. They also
give an example in the next sentence,
"Traditional_WIN" . See
http://java.sun.com/j2se/1.4/docs/api/java/util/Locale.html
, the paragraph just below the country code link.

best regards,

dalibor topic

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

* Re: ResourceBundle variants and child variants
  2002-12-10  8:45     ` Dalibor Topic
@ 2002-12-10 12:23       ` Mark Wielaard
  2002-12-10 14:18         ` Tom Tromey
  0 siblings, 1 reply; 12+ messages in thread
From: Mark Wielaard @ 2002-12-10 12:23 UTC (permalink / raw)
  To: Dalibor Topic; +Cc: Andrew Haley, mauve-discuss

Hi,

On Tue, 2002-12-10 at 17:45, Dalibor Topic wrote:
> I think I remember the time when there were child
> variants for *Locales* in wide useage in the EU, due
> to pending conversion to a new currency. de_DE_EURO
> anyone? 

Actually that is a "normal variant".
A Locale with a child variant would be de_DE_EURO_POSIX or
de_DE_POSIX_EURO. (Hmmm, makes you think, what is more important,
EURO or POSIX?)

> As I understand the spec for Locale, it says "Where
> there are two variants, separate them with an
> underscore, and put the most important one first." ,
> so it is possible to have child variants. They also
> give an example in the next sentence,
> "Traditional_WIN" . See
> http://java.sun.com/j2se/1.4/docs/api/java/util/Locale.html
> , the paragraph just below the country code link.

So they do exist :) I think what happened is that ResourceBundle got
rewritten so many times (the Sun bug database has a lot of bug reports
about it being rewritten once again) that the original algorithm that
just chopped off a '_' at a time somewhere got lost. And that the new
specification now just explains what this new algorithm does (take the
Locale variant as one string).

Sigh, I really wish there was a real Java standard.

But I didn't find any bug reports about people missing the child variant
support in the first place so maybe it just wasn't a very useful feature
in the first place.

I don't think that it is such a slam-dunk as Andrew says but removing
(or disabling) these tests does make sense. Does anybody disagree?

Cheers,

Mark

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

* Re: ResourceBundle variants and child variants
  2002-12-10 12:23       ` Mark Wielaard
@ 2002-12-10 14:18         ` Tom Tromey
  2002-12-10 14:31           ` Mark Wielaard
  2002-12-11  2:47           ` Andrew Haley
  0 siblings, 2 replies; 12+ messages in thread
From: Tom Tromey @ 2002-12-10 14:18 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: Dalibor Topic, Andrew Haley, mauve-discuss

Mark> Sigh, I really wish there was a real Java standard.

Yeah.  Though then we'd spend hundreds of hours in committee meetings :-)

Mark> I don't think that it is such a slam-dunk as Andrew says but removing
Mark> (or disabling) these tests does make sense. Does anybody disagree?

Is there any way to test the 1.4 JDK and see what Sun is up to?  I
realize that isn't always normative, but it seems like in this case it
could be.

Tom

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

* Re: ResourceBundle variants and child variants
  2002-12-10 14:18         ` Tom Tromey
@ 2002-12-10 14:31           ` Mark Wielaard
  2002-12-12  7:39             ` Mark Wielaard
  2002-12-11  2:47           ` Andrew Haley
  1 sibling, 1 reply; 12+ messages in thread
From: Mark Wielaard @ 2002-12-10 14:31 UTC (permalink / raw)
  To: tromey; +Cc: Dalibor Topic, Andrew Haley, mauve-discuss

Hi,

On Tue, 2002-12-10 at 23:17, Tom Tromey wrote:
> Mark> I don't think that it is such a slam-dunk as Andrew says but removing
> Mark> (or disabling) these tests does make sense. Does anybody disagree?
> 
> Is there any way to test the 1.4 JDK and see what Sun is up to?  I
> realize that isn't always normative, but it seems like in this case it
> could be.

It fails the tests current in Mauve (just like gcj).

FAIL: gnu.testlet.java.util.ResourceBundle.getBundle: book sample (number 2)
FAIL: gnu.testlet.java.util.ResourceBundle.getBundle: book sample (number 5)

They only reason I ask is because I know that kaffe succeeds on these
tests. (And as the test name implies, The Book descibes them.)

Cheers,

Mark

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

* Re: ResourceBundle variants and child variants
  2002-12-10 14:18         ` Tom Tromey
  2002-12-10 14:31           ` Mark Wielaard
@ 2002-12-11  2:47           ` Andrew Haley
  1 sibling, 0 replies; 12+ messages in thread
From: Andrew Haley @ 2002-12-11  2:47 UTC (permalink / raw)
  To: tromey; +Cc: Mark Wielaard, Dalibor Topic, mauve-discuss

Tom Tromey writes:
 > Mark> Sigh, I really wish there was a real Java standard.
 > 
 > Yeah.  Though then we'd spend hundreds of hours in committee meetings :-)
 > 
 > Mark> I don't think that it is such a slam-dunk as Andrew says 

I agree; I was guilty of hyperbole.  And not for the first time, nor
probably the last!  :-)

 > Mark> but removing
 > Mark> (or disabling) these tests does make sense. Does anybody disagree?
 > 
 > Is there any way to test the 1.4 JDK and see what Sun is up to?  I
 > realize that isn't always normative, but it seems like in this case it
 > could be.

Um, I guess.

Andrew.

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

* Re: ResourceBundle variants and child variants
  2002-12-10 14:31           ` Mark Wielaard
@ 2002-12-12  7:39             ` Mark Wielaard
  0 siblings, 0 replies; 12+ messages in thread
From: Mark Wielaard @ 2002-12-12  7:39 UTC (permalink / raw)
  To: tromey; +Cc: Dalibor Topic, Andrew Haley, mauve-discuss

Hi,

On Tue, 2002-12-10 at 23:31, Mark Wielaard wrote:
> On Tue, 2002-12-10 at 23:17, Tom Tromey wrote:
> > 
> > Is there any way to test the 1.4 JDK and see what Sun is up to?  I
> > realize that isn't always normative, but it seems like in this case it
> > could be.
> 
> It fails the tests current in Mauve (just like gcj).
> 
> FAIL: gnu.testlet.java.util.ResourceBundle.getBundle: book sample (number 2)
> FAIL: gnu.testlet.java.util.ResourceBundle.getBundle: book sample (number 5)
> 
> They only reason I ask is because I know that kaffe succeeds on these
> tests. (And as the test name implies, The Book descibes them.)

Since nobody complained I "fixed" these two tests. Kissme, gcj and Sun
JDK 1.4.1 now succeed all the getBundle() tests. Kaffe still has some
failures, but those seem to be real failures in the Kaffe ResourceBundle
implementation.

Cheers,

Mark

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

end of thread, other threads:[~2002-12-12 15:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-07 10:46 ResourceBundle variants and child variants Mark Wielaard
2002-12-09  9:39 ` Andrew Haley
2002-12-09 10:34   ` Mark Wielaard
2002-12-09 10:38     ` Andrew Haley
2002-12-09 11:10       ` Mark Wielaard
2002-12-10  3:03         ` Andrew Haley
2002-12-10  8:45     ` Dalibor Topic
2002-12-10 12:23       ` Mark Wielaard
2002-12-10 14:18         ` Tom Tromey
2002-12-10 14:31           ` Mark Wielaard
2002-12-12  7:39             ` Mark Wielaard
2002-12-11  2:47           ` Andrew Haley

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).