Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Damned you, Sun!

 
Jonny Andersson
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ryan McGuire
Ranch Hand
Posts: 1057
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15214
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic