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

已回答

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?

评论操作 固定链接

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

请先登录再写评论。