Community
Participate
Working Groups
Created attachment 203468 [details] Example Code Snippet illustrating unnecessary compiler warning about unused methods
Strange. The warning is only meant for private unused methods. I'll investigate.
A picture is not so good for pasting into the Package Explorer ;-). A simple working snippet would be good. It might well be that the warning is correct: if the #provideAnalysisFixture method is not defined in an interface as abstract in a super class then it is indeed not needed.
Dani, it's not overriding any method. The method is called by Google Guice. It finds this method via reflection when the Module is registered. So, if the compiler does the overrides check this may well be an intended behavior and thus not a bug. For my defense: I asked before filing this bug: http://www.eclipse.org/forums/index.php/t/240171/ :)
The unused detection assumes that no reflection is used. Otherwise nothing could be flagged.
I think it is reasonable to take some common annotations into account for this inspection.
Verified INVALID for 3.8 M3
(In reply to comment #6) > Verified INVALID for 3.8 M3 That's it? No additional comment about the previous suggestion? Would you even consider to accept a patch or something?
> Would you even > consider to accept a patch or something? While it cannot be guaranteed ahead of time that it will make it, we can certainly consider it. In the end it would depend upon how generally useful this is going to be. For a starting point of your fix and test, you can take a look https://bugs.eclipse.org/bugs/show_bug.cgi?id=356417 and the attached patch there. I'll leave this defects as INVALID for the time being as in general a reflective usage doesn't count. At the appropriate time, we can consider reopening it.
(In reply to comment #8) > For a starting point of your fix and test, you can take a look > https://bugs.eclipse.org/bugs/show_bug.cgi?id=356417 and the > attached patch there. I'm afraid bug 356417 does not have any attachments. > > I'll leave this defects as INVALID for the time being as in general > a reflective usage doesn't count. At the appropriate time, we can > consider reopening it. I understand.
(In reply to comment #9) > (In reply to comment #8) > > For a starting point of your fix and test, you can take a look > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=356417 and the > > attached patch there. > > I'm afraid bug 356417 does not have any attachments. Sorry, cut & paste problem. Please take a look at: https://bugs.eclipse.org/bugs/show_bug.cgi?id=346529 (Don't know if this bug maps totally to the current issue, but should be good starting point.)