• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Depreciated methods

 
Ian Roberts
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As part of the assignment I need to remove two depreciated methods from existing source code. However, looking on the Sun website there is no clue to what has actually replaced them. I would have thought that if a method or constructor was depreciated, as part of the Javadoc, the replacement solution would be publicly advertised - is this not the case or is it me!?
I'm quite happy to provide what I think will work but it seems a little harsh for methods and constructors to be depreciated without information regarding the new solution.
Has anyone else had a similar problem?
 
Ken Krebs
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ian,
What specific "deprecated" methods are you referring to ?
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ian,
Originally posted by Ian Roberts:
As part of the assignment I need to remove two depreciated methods from existing source code. However, looking on the Sun website there is no clue to what has actually replaced them. I would have thought that if a method or constructor was depreciated, as part of the Javadoc, the replacement solution would be publicly advertised - is this not the case or is it me!?
I'm quite happy to provide what I think will work but it seems a little harsh for methods and constructors to be depreciated without information regarding the new solution.

You must have one of the older assignments because I think the task of removing deprecated methods is no longer part of the newer assignments. To answer your question: it depends on the specific methods that are deprecated, but often the recommended replacement is given. When you're looking at the Java API (in Javadoc format) click on the Deprecated heading at the top of the page that comes up. This shows all the stuff in the Java API that has been deprecated. Locate the deprecated methods of interest, read the explanation, and follow the links. Often the recommended replacement is given. If it's not you may have to go to the documentation for the class containing the deprecated methods and read the whole thing. It appears that this kind of thing is well linked in the Java API, but there may have been an omission in the case of the methods you're looking for.
 
Ian Roberts
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
Thanks for your replies! After sending the original e-mail I rechecked the Java API Javadoc and discovered that there are in fact some suggestions on alternative methods! So, all my waffle was not worthwhile!
Thanks anyway!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic