It's not a secret anymore!
The moose likes Beginning Java and the fly likes Damned you, Sun! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Damned you, Sun!" Watch "Damned you, Sun!" New topic

Damned you, Sun!

Jonny Andersson
Ranch Hand

Joined: Sep 07, 2004
Posts: 87
It took me a little while to see the error when I copied their code for the MyResources class in the documentation at the top of the page as a starter for my own ListResourceBundle. For a moment did I thougt that either eclips or my Java compiler have got crazy : )

Can you see the error? Assume all imports are available.

Truly agile Java application developer with Extreme Programming and high quality craftsmanship
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Hmm. Finding mistakes in a beta edition of a draft specification is relatively easy to do. Why are you using the draft spec? The ListResourceBundle example in the proper released specs are fine.
[ August 22, 2006: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1044
What version of Java are you compiling with? The documentation for ListResourceBundle in 1.4 and 1.5 are different from that for 1.6 (which is what you used).
Jonny Andersson
Ranch Hand

Joined: Sep 07, 2004
Posts: 87
I am mostly using Java 5 and the Java 6 beta and okay, the beta is just a beta but this is the ListResourceBundle class that is old and that should not have changed very much or maybe not at all. But you are right, they have actually changed a little in the documentation since Java 5 and Java 1.4. I did not check that because it is this old class.

So you could see the error? : ) I got blind on it first.
[ August 22, 2006: Message edited by: Jonny Andersson ]
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15092

I'm too tired to think about what the error could be, but if you find an error in the documentation or elsewhere in JDK 6 Beta then please help Sun to improve Java by filling in a bug report in Sun's bug database - this is your chance to contribute to JDK 6!

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
I think it would be pretty obvious (and easy to correct) for anyone who tried to actually use the code. But yeah - don't just complain about it, report it!

"I'm not back." - Bill Harding, Twister
I agree. Here's the link:
subject: Damned you, Sun!
It's not a secret anymore!