Bug 330841 - Public Methods Flagged As Unused
Summary: Public Methods Flagged As Unused
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-22 13:58 EST by Missing name CLA
Modified: 2010-12-07 00:02 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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