Re: How can I deprecate a method of my own package?
Sunday, June 17, 2001 07:16 AM
The tag is @deprecated, not @deprecate!
If you are a "born bad" programmer like me ;-) you can also remove deprecated method implementation (commenting it) and throw
java.lang.UnsupportedOperationException("Method xxxx() is deprecated! use yyyy() instead!");. But this approach is not correct: it should be used only if you want to be sure that people won't longer use the method. This breaks backward compatibility.