We have an internal Java library, that for legacy reasons, needs to be compiled using Java 1.4. However, this lib has gone through several versions, the latter of which have had certain methods and objects deprecated. For client support reasons, the code needs to use some of these deprecated methods/objects. As such, we always keep the latest lib on the build path of our projects (in Eclipse).
I would like to
@SuppressWarnings("deprecation");
Though, do to the aforementioned 1.4 dependency, this is not possible.
Is there a way for me to remove the warnings, if only from my Eclipse Problems view, and somewhat cleanup my development environment?
Is there a way for me to remove the warnings, if only from my Eclipse Problems view, and somewhat cleanup my development environment?
You can configure the Java Compiler to ignore the Deprecated Warnings. I'd suggest to configure this setting for the specific project, not globally. To do so, right-click on your project and go to Properties > Java Compiler > Errors/Warnings. Click Enable project specific settings and then unfold Deprecated and restricted API and select Ignore for Deprecated API.
This will disable all deprecated warnings though.
If you're not concerned about deprecation anywhere in that project, you could always give it custom project compilation settings and set it to ignore deprecation. It's not ideal, but it may well be better for you in this case than living with the deprecation warnings - it means you'll be able to spot ones in your other projects more easily.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With