Every good tree bears good fruit
Mano Ag wrote:
Hi,
This thread from the ranch is related to your question:
https://coderanch.com/t/683016/java/Deprecation-Java
Linwood Hayes wrote:I find sometimes after I upgrade jdk or library, some codes are no longer supported and compiling gives error since some methods or classes become deprecated as of certain new version of jdk or library. In this case, if we use @Deprecated to annotate the class, method, etc, the compiling passes. Question --- Why compiling passes with @Deprecated when the new jdk or library no longer has that class or method ? Is it because when you put @Deprecated compiler automatically goes back to older version to check if it works with older version ?
Deprecated. Use the constructor that takes a milliseconds value in place of this constructor
Junilu Lacar wrote:It's probably your IDE that's trying to watch your back and force you to fix deprecation warnings. If you compile from the command line, javac will normally give you a warning message but will still compile any valid code.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Tim Holloway wrote:Be grateful. The Good Old Days were not that good.
Dave Tolls wrote:So I'm not sure what your actual issue is, but simply adding @Deprecated to something doesn't work won't recreate a missing method.
Junilu Lacar wrote:
Tim Holloway wrote:Be grateful. The Good Old Days were not that good.
Ah, but it's fun to wax nostalgic about the simpler times when physical hardware constraints kept us from winding too much rope around our necks and complexity could be kept within the bounds of a floppy disk.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |