eppleton commented on PR #9820:
URL: https://github.com/apache/netbeans/pull/9820#issuecomment-7191083827

   Thanks for the rework. I re-read the channel code at 61f31e817:
   
   - **Quadratic reads/writes:** resolved by bd0b6a5d6a. The content is read 
once into memory, and writes are flushed on `force`/close only. The Javadoc now 
says so explicitly, including that other `FileObject` readers won't see the 
changes until then.
   - **`force`:** resolved; it now flushes pending content.
   - **Two write paths:** resolved by 2abc58e806. `newByteChannel` now 
delegates to `NioFileObjectChannel.open`, so 
`TRUNCATE_EXISTING`/`APPEND`/`CREATE_NEW` and locking behave the same for both.
   - **Shared `State.class` monitor:** understood. With no foreign code under 
the lock and the I/O done outside it, I agree it's not a practical problem.
   
   Two points from earlier are still open:
   
   1. `NioPathForFileObject.toUri()` still calls `fileObject.toURI()` without a 
null check (I saw your note above).
   2. The question in the `NioFileTypeDetector` thread: `NbFileTypeDetector` 
lives in `core/core.jar`, which a normal `nbexec` launch doesn't put on the 
system classpath that `Files.probeContentType` uses. It would be good to 
confirm it works in a launched IDE, not only under `NbModuleSuite`.
   


-- 
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