Community
Participate
Working Groups
HEAD class MyClass { //private native void foo(); private void bar() { // } } abstract class MyClass1 { abstract void foo(); private void bar() { // } } In the above case, commenting and uncommenting the native method foo in MyClass makes the unused warning on bar appear or disappear. The location of the native method i.e. whether defined before/after bar doesnt seem to matter.
I believe this was intentional and fixed through bug 243917.
The fix for bug 243917 was a bad idea and should be removed. Static analysis doesn't work with non-Java accesses via natives and reflection. We accept that everywhere else, and there's no reason to deviate in this special case. @SuppressWarnings("unused") solves the problem.
(In reply to Markus Keller from comment #2) > The fix for bug 243917 was a bad idea and should be removed. > > Static analysis doesn't work with non-Java accesses via natives and > reflection. We accept that everywhere else, and there's no reason to deviate > in this special case. @SuppressWarnings("unused") solves the problem. Agree, esp. I don't like warnings to be suppressed without being given a choice. Let's take a call during 4.6.
(In reply to Jay Arthanareeswaran from comment #3) > Agree, esp. I don't like warnings to be suppressed without being given a > choice. Let's take a call during 4.6. That will have to be 4.7. I will put it on my plate so we this doesn't slip.
Bulk move out of 4.8
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.