Good Code Marked As Bad(3281)

I have noticed several times in 3281 that good code is marked with a lot
of red. It compiles fine, but Intellij detects problems that aren't
there. This seems to be related to comments somehow. I notice it
usually shows up when commenting out some block of code or sometimes
even adding a line comment. If I remove the comment, the red goes away.
Also, sometimes I can get it to go away just by removing and re-adding
a closing brace. This seems to cause it to re-check the code.

Anyone else seeing this?

thanks,
adam

2 comments
Comment actions Permalink

Adam C wrote:

I have noticed several times in 3281 that good code is marked with a lot
of red. It compiles fine, but Intellij detects problems that aren't
there.


...

If I remove the comment, the red goes away.
Also, sometimes I can get it to go away just by removing and re-adding
a closing brace. This seems to cause it to re-check the code.


I get the same thing every time I duplicate exception handler:

Here is an example (the selection is marked with square brackets):

try {
foo();
} catch Ex1 {
bar();
[} catch Ex2 {
baz();
]}



Press ctrl+D and quickly change the exception before the syntax checker
kicks in. After that IDEA doesn't 'see' one of the braces. Deleting
something in that part of code to get the code in incorrect state and
typing it again (but not undoing it) fixes the problem. If you type
something in another part of the code (e.g. other method, this error
would stay until restart of IDEA)

Dimitar

0
Comment actions Permalink

Looks like it's a known problem: http://www.jetbrains.net/jira/browse/IDEADEV-60

-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"


0

Please sign in to leave a comment.