I have warnings for the missing @Override
annotation enabled by default in Eclipse, but for a couple of classes I'd rather have it disabled.
Is there a way to do this? Intuitively one would expect something like @SuppressWarnings("override")
but that is of course not supported.
In eclipse -> windows -> preferences , select java -> compiler -> Errors/warnings
type override in the search bar then for "missing @overriden annotation" set level to ignore.
You should annotate all methods with @Override
or when you don´t want to annotate with this annotation, than you should edit compiler settings in
eclipse to not show a warning when you don´t annotate with @Override.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.