Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Who know about deprecated?  RSS feed

 
Tanakorn Numrubporn
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm work on Lucene in Eclipse environment. I see some class is mark as "deprecated". What it's mean?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
deprecated means a method or class has been flagged to alert developers not to use them. When you want to discontinue a method you first deprecate it. There are a whole bunch of deprecated methods in the JDK. In the case of the JDK, deprecated methods are never removed, you just shouldn't be using them because there are far better ways available in the JDK to do the same things. Check the message included with the deprecation warning, it should direct you to what other code to use instead.

My guess it you are using Lucence 1.9. Lucence differs from the JDK in that deprecated methods are also removed. Petty much everything in 1.9 was deprectaed to be completely replaced in 2.0. So if you use any deprected methods in 1.9, don't expect your code to work on 2.0.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the JDK, deprecated means you can be certain it will always be there and work the same way (in contrast with other things which seem to have a life of their own).
That's not what it was meant to be, but that's how it turned out due to Sun's policy of never removing anything deprecated but instead leaving it alone rather than messing with it to conform to the latest hype.
 
Tanakorn Numrubporn
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your useful information. I'm studying in master degree in IT field. Now I finding for the topic of IR indexing and searching using lucene base.
Please tell me about good source (and easy to interpret information) on www.

PS. I'm have no background about IT because I came from Economic field in bachelor's degree. But now I want to leap aheap to force my self go in IT career path, so I have decided to graduate with thesis, which almost of my colleage didn't choose it, I have no fear and I think I find the excellence community about programming knowledge. Please help me for a favor.

Sincere for java and this community

Thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!