Why won't IntelliJ IDEA let me rename a Java method to "enter"?

Answered

I try to rename a method to "enter" and in the Refactoring Preview window, it simply says "INVALID" with no reason for it.

There are no other methods named "enter" in this or any other class. I can name a method "enter" when I create it, I just can't rename a method to "enter".

"enter" is not a Java keyword. Perhaps someone thinks it is?

0
2 comments

Can't reproduce.

Could you please provide a sample project and the exact steps?

Does File | Invalidate Caches and Restart help?

1

Yes, after Invalidate Caches and Restart, it works.

0

Please sign in to leave a comment.