jtulach commented on code in PR #9820:
URL: https://github.com/apache/netbeans/pull/9820#discussion_r4742752945


##########
platform/openide.filesystems/src/org/openide/filesystems/FileSystem.java:
##########
@@ -737,6 +741,27 @@ public final void 
removeFileChangeListener(FileChangeListener fcl) {
     void waitRefreshed() {
     }
 
+    final synchronized Path toVirtualPath(FileObject fo) {
+        if (nioFs == null) {
+            nioFs = new NioFsForFileSystem(this);
+        }
+        return NioPathForFileObject.create(fo, nioFs);

Review Comment:
   - that's unlikely to make any difference
   - if the compiler is clever, it can move the call out of synchronized block 
itself
   - `NioPathForFileObject.create` doesn't access any global state ...
   - ... so it should be freely floating
   - in any case it cannot block for long



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to