Here's the code snippet:
class MyClass {
private native void foo();
}
For the above, Eclipse (namely, 3.7.0) gives a warning
The method foo() from the type MyClass is never used locally
Alright, but when I try to suppress the warning:
class MyClass {
@SuppressWarnings("unused")
private native void foo();
}
It complains
Unnecesary @SuppressWarnings("unused")
So, is there any way to make it stop complaining?
Update
Sorry for the incomplete information - this warning is only displayed in an AspectJ project. Once I create a simple Java project and put my class in it, all works fine.
As far as I understand, AspectJ uses its own compiler, so this warning must be generated by it. I'm using AspectJ Development Tools plug-in:
Version: 2.1.3.e37x-20110628-1900
AspectJ version: 1.6.12.20110613132200