Yesterday I refactored my project and I changed layout of my packages (I moved some packages into another packages, created new packages etc). But now, when I try to run JUnit test I get NoSuchMethodError
on methods which name is changed after refactoring. Also, when I change other code in methods, IDEA still running old code.. I tried to run "Invalidate caches" in File menu, also I tried to reboot computer - no result. Where can be problem?
EDIT: Yesterday after moving packages IDEA doesn't correctly change package declarations in .java
files, so I changed them by hand
Right-click anywhere in the editor and choose Local History | Show History from the context menu. In the dialog that opens, the left-hand pane shows a list of all saved revisions of the current file with timestamps.
You can see the diff of the opened file by going to Main Menu -> VSC -> GIT -> Compare with same Repository Version. in the toolbar, using which you can directly view the diff of the opened file. Save this answer.
From the main menu, select File | Repair IDE. IntelliJ IDEA will automatically launch the first recovery step and refresh the virtual file system. IntelliJ IDEA will display a notification that you can use to continue or complete the recovery process.
Revert uncommitted changes You can always undo the changes you've made locally before you commit them: In the Commit tool window Alt+0 , select one or more files that you want to revert, and select Rollback from the context menu, or press Ctrl+Alt+Z .
What I did in order to solve the issue was to "invalidate and Restart":
File -> invalidate and Restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With