• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Damned you, Sun!

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Bartender
Posts: 1205
22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic