Czukowski created NETBEANS-6032: ----------------------------------- Summary: Possible race condition in renaming PHP classes Key: NETBEANS-6032 URL: https://issues.apache.org/jira/browse/NETBEANS-6032 Project: NetBeans Issue Type: Bug Components: php - Editor Affects Versions: 12.5 Environment: *Product Version:* Apache NetBeans IDE 12.5
*Java:* 15.0.2; OpenJDK 64-Bit Server VM 15.0.2+7-27 *Runtime:* OpenJDK Runtime Environment 15.0.2+7-27 Reporter: Czukowski When a class name is renamed using Rename refactoring with 'Rename Also File With The Declaration', sometimes there is a message box with an error about the renamed file "seems no longer valid". If this happens, I can find the file has been renamed, but the class name has not. There is some relevant information in {{messages.log}}, see below, it mentions the file name {{ProductSelectionCriterium.php}} which is the resulting file name (the one that it was supposed to be named after the rename). If I had to guess, it would seem that the changes are committed with a delay to the file system. Could be a Windows-specific issue. It also seems that the rename process is interrupted when this happens, because sometimes (though again, not always) I can see some of the class occurrences in other files not renamed as well. {noformat} SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.refactoring.spi.impl.RefactoringPanel$2 msg Caused: org.openide.filesystems.FileStateInvalidException: C:\Workspace\Org\org\app\services\Product\Selection\ProductSelectionCriterium.php@cc7bc6a:4878bb09[invalid] at org.openide.loaders.DataObject.find(DataObject.java:587) Caused: org.openide.loaders.DataObjectNotFoundException: C:\Workspace\Org\org\app\services\Product\Selection\ProductSelectionCriterium.php@cc7bc6a:4878bb09[invalid] at org.openide.loaders.DataObject.find(DataObject.java:610) at org.netbeans.modules.csl.spi.support.ModificationResult.commit(ModificationResult.java:113) at org.netbeans.modules.csl.spi.support.ModificationResult.commit(ModificationResult.java:105) at org.netbeans.modules.refactoring.spi.RefactoringCommit.commit(RefactoringCommit.java:128) Caused: java.lang.RuntimeException at org.netbeans.modules.refactoring.spi.RefactoringCommit.commit(RefactoringCommit.java:140) at org.netbeans.modules.refactoring.api.RefactoringSession.reallyDoRefactoring(RefactoringSession.java:141) at org.netbeans.modules.refactoring.api.RefactoringSession.access$100(RefactoringSession.java:54) at org.netbeans.modules.refactoring.api.RefactoringSession$1.run(RefactoringSession.java:97) at org.netbeans.modules.refactoring.api.RefactoringSession$1.run(RefactoringSession.java:95) at org.netbeans.modules.editor.lib.BeforeSaveTasks.runWithOnSaveTasksDisabled(BeforeSaveTasks.java:68) at org.netbeans.editor.Utilities.runWithOnSaveTasksDisabled(Utilities.java:1635) at org.netbeans.modules.refactoring.api.RefactoringSession.doRefactoring(RefactoringSession.java:95) at org.netbeans.modules.refactoring.spi.impl.RefactoringPanel$2.run(RefactoringPanel.java:550) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) ALL [null]: The file C:/Workspace/Org/org/app/services/Product/Selection/ProductSelectionCriterium.php seems no longer valid! WARNING [org.netbeans.modules.versioning.util.Utils]: associateEncoding() no file object available for C:\Users\czukowski\AppData\Local\Temp\vcs-1632144195553\vcs-1632150665748\ProductSelectionCriterium.php WARNING [org.netbeans.modules.versioning.util.Utils]: associateEncoding() no file object available for C:\Users\czukowski\AppData\Local\Temp\vcs-1632144195553\vcs-1632150674225\ProductSelectionCriterium.php WARNING [org.netbeans.modules.versioning.util.Utils]: associateEncoding() no file object available for C:\Users\czukowski\AppData\Local\Temp\vcs-1632144195553\vcs-1632150682920\ProductSelectionCriterium.php WARNING [org.netbeans.modules.versioning.util.Utils]: associateEncoding() no file object available for C:\Users\czukowski\AppData\Local\Temp\vcs-1632144195553\vcs-1632150683037\ProductSelectionCriterium.php WARNING [org.netbeans.modules.versioning.util.Utils]: associateEncoding() no file object available for C:\Users\czukowski\AppData\Local\Temp\vcs-1632144195553\vcs-1632150712914\ProductSelectionCriterium.php WARNING [org.netbeans.modules.versioning.util.Utils]: associateEncoding() no file object available for C:\Users\czukowski\AppData\Local\Temp\vcs-1632144195553\vcs-1632150721106\ProductSelectionCriterium.php WARNING [org.netbeans.modules.versioning.util.Utils]: associateEncoding() no file object available for C:\Users\czukowski\AppData\Local\Temp\vcs-1632144195553\vcs-1632150753484\ProductSelectionCriterium.php {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists