Bug 330841

Summary: Public Methods Flagged As Unused
Product: [Eclipse Project] JDT Reporter: Missing name <ljohnson>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: VERIFIED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann, srikanth_sankaran
Version: 3.7   
Target Milestone: 3.7 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Missing name CLA 2010-11-22 13:58:46 EST
Build Identifier: 20100917-0705

When the "Unused local or private member" Error/Warning option is selected for Unnecessary Code, public methods are flagged as unused.  This should not be the case since these methods, by definition, are declared for outside use.  Any method flagged with the 'public' keyword should be excluded from this check.

Reproducible: Always

Steps to Reproduce:
1. Create a test class and add a public method to it
2. Select either "Error" or "Warning" for "Unused local or private member"
3. Compile the test class and the error/warning will be generated.
Comment 1 Olivier Thomann CLA 2010-11-22 14:20:45 EST
Please provide a test case that shows the problem.
Once this is done, Ayushman, please follow up.
Comment 2 Missing name CLA 2010-11-22 14:44:04 EST
(In reply to comment #1)
> Please provide a test case that shows the problem.
> Once this is done, Ayushman, please follow up.

My mistake.  Please close this issue.  The class that I was looking at was a private inner class. This version of Eclipse now reports those method as unused whereas the older version did not.  I simply missed that the inner class was private.
Comment 3 Olivier Thomann CLA 2010-11-22 14:47:24 EST
Closing as INVALID.
Comment 4 Srikanth Sankaran CLA 2010-12-07 00:02:48 EST
Verified for 3.7 M4