History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-11991
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Anna Kozlova
Reporter: Derek Foster
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Regression: "Declaration can have 'final' modifier" inspection is not working

Created: 10 Nov 06 03:07   Updated: 20 Nov 06 16:03
Component/s: Code Analysis. Inspection
Fix Version/s: Demetra 6.0.3

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. screenshot-1.jpg
(269 kb)

Build: 5,784
Fixed in build: 6,561
Severity: High


 Description  « Hide
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!



 All   Comments   Work Log   Change History      Sort Order:
Anna Kozlova - 10 Nov 06 12:40
Could you please provide a sample example for your problem. I've tried on your description and everything works as expected. Thanks.

Derek Foster - 18 Nov 06 00:22
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 - 18 Nov 06 00:26
Note that I get the same problem even if I declare m_x to be 'private'.