|SuppressWarnings unchecked Vs rawtypes and suppressRawWhenUnchecked [message #1751128]
||Wed, 04 January 2017 17:14
| Adriano Serio
Registered: May 2011
Location: Milan, IT
Recently I bought a new PC, so I wanted to start using a new Eclipse version (Neon).
Previously I had a very, very old version (Ganymede!).
The problem is the fact that on new versions (maybe from Helios) the @SuppressWarnings("unchecked") works no more for Raw Types warnings.
Actually I would like to prevent this kind of warnings, but doesn't depend on me. So I must suppress them.
I also would like to change all SuppressWarnings from "unchecked" into "rawtypes". But also this doesn't depend on me!
So my only option would be to restore backward compatibility with old code, which uses @SuppressWarnings("unchecked") for raw types.
From a deep search over Internet, there would be the property suppressRawWhenUnchecked=true to be set before Eclipse start. And which should should guarantee me backwards compatibility.
I tried various ways found over Internet to implement it, but none worked.
- I put -DsuppressRawWhenUnchecked=true into Windows desktop shortcut's path.
- I put -DsuppressRawWhenUnchecked=true into eclipse.ini
- I put org.eclipse.jdt.core.compiler.problem.suppressRawWhenUnchecked=true into org.eclipse.core.resources.prefs
None of those solutions worked.
So it's me setting that property the wrong way?
Or maybe, as I'm suspecting, it works no more into Neon version?
Do I have any hope to have backward compatibility with such old code I must work on and which uses @SuppressWarnings("unchecked") over Raw Types as for the (very) old Eclipse versions we used into our project up to now?
Thank you all!
Powered by FUDForum
. Page generated in 0.01446 seconds