This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Damned you, Sun!" Watch "Damned you, Sun!" New topic
Author

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 http://java.sun.com/javase/6/docs/api/java/util/ListResourceBundle.html 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
Bartender

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: 1006
    
    3
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: 14074
    
  16

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 7 API documentation
Scala Notes - My blog about Scala
Jim Yingst
Wanderer
Sheriff

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Damned you, Sun!
 
Similar Threads
Buckets and Hashes
how to implement globally unique identifier (GUID) in tomcat
Query in Designing a system of classes
Vector array
JTable filter with RegexFilter