eirikbakke opened a new pull request #1000: [NETBEANS-583] Avoid errors related 
to ClosedByInterruptException
URL: https://github.com/apache/incubator-netbeans/pull/1000
 
 
   See the related discussion in 
https://github.com/apache/incubator-netbeans/pull/854 .
   
   In commit 4b82e6adb31e294c74fd2fa99779ce9e27ae6184, a lot of calls to
   "new FileInputStream/FileOutputStream" were changed to NIO-based
   Files.newInputStream/newOutputStream. This caused a new class of intermittent
   bugs to appear, because the NIO-based streams, unlike
   FileInputStream/FileOutputStream, all throw ClosedByInterruptException if the
   current thread is interrupted. Few of the current call sites, nor the APIs 
they
   implement, are designed to allow this kind of fine-grained interrupt 
handling.
   
   This commit carefully goes through each of the changes in
   4b82e6adb31e294c74fd2fa99779ce9e27ae6184, redirecting potentially unsafe 
uses of
   Files.newInputStream/newOutputStream to a new class FilesNI, which currently
   just creates a regular old FileInputStream/FileOutputStream. An NIO-based
   approach, if necessary, can be implemented there at a later point if deemed
   worthwhile.
   
   ClosedByInterruptException currently appears in bug reports NETBEANS-609,
   NETBEANS-1340, NETBEANS-1061, NETBEANS-920, NETBEANS-583, NETBEANS-1197, and
   NETBEANS-1357.
   
   The JarClassLoader case was handled separately in NETBEANS-1197.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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