Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Anna Kozlova
Subsystem
Code Analysis. Inspection
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Derek Foster
    5 years ago (10 Nov 2006 04:07)
  • Updated by   root
    2 years ago (17 Jan 2010 20:37)
  • Jira: IDEADEV-11991
    (history, comments)
 
IDEA-35275 Regression: "Declaration can have 'final' modifier" inspection is not working
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
As of version 6.0.2, when I run an inspection via right-clicking an edited file and selecting "Analyze|Inspect", it never finds any fields which can be declared 'final', even when the fields are only assigned to once, in the constructor of the class or in their own declarations. I can run this on a class with thirty different fields in it, most of which are only assigned once, in the constructor or in their declarations, and the inspection does not identify any of them as potentially being able to be made final.

This worked fine in prior versions.

Please fix!

Issue was resolved
Comments (3)
 
History
 
Linked Issues (?)
 
Anna Kozlova
  Anna Kozlova
10 Nov 2006 13:40
5 years ago
Could you please provide a sample example for your problem. I've tried on your description and everything works as expected. Thanks.
Derek Foster
  Derek Foster
18 Nov 2006 01:22
5 years ago
I am attaching a screenshot from build 6103 which shows:
1) A sample class,
2) The errors that are reported (note that it does not report that the declaration for m_x can be made final as it should)
3) The dialog that I get when I click on the 'wrench' icon, showing my current inspection settings and demonstrating that the inspection is, in fact, enabled, and that it should report fields which can be made final.

I would really like this to be fixed prior to the 6.0.2 release. The fact that this bug is happening suggests that there is a serious problem with IntelliJ's low-level code analysis routines which could probably manifest in other ways as well.
Derek Foster
  Derek Foster
18 Nov 2006 01:26
5 years ago
Note that I get the same problem even if I declare m_x to be 'private'.