Reputation: 26
I have a line of code in a class that reads:
g.setColor(Color.BLACK);
I changed it to g.setColor(Color.WHITE);
but Intellij saves it as g.setColor(Color.BLACK);
.
I have tried invalidating the cache in Intellij and restarting, and that has not fixed the problem.
I tried closing Intellij and editing the file in Notepad++. When I opened Intellij, it was still the old code, and Notepad++ told me that another program had modified the document. When I say yes to reload the document, it changes back to the old code.
Upvotes: 0
Views: 70
Reputation: 226
That sound like a bug to me, kill any intelliJ instances and reopen it again to see if it solve the issue, if not, close intelliJ again and try to edit it with notepad++, if it tell you the same things "that another program had modified the document" that mean there is a process with that file open that keep writing to it.
Multiple Processes writing to the same file resolution: (Also for file already opened by another program issue)
You can use Resources Monitor of the Task Manager -> Performance tab and check for any associated handles with that file name you could use Process Monitor as well to achieve the same result: https://technet.microsoft.com/en-us/library/bb896645.aspx and kill the process that keep writing to it.
Dany
Upvotes: 1