Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-604

FileUtils.doCopyFile(File, File, boolean) can throw ClosedByInterruptException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.7
    • None
    • None

    Description

      The method FileUtils.doCopyFile(File, File, boolean) can throw ClosedByInterruptException apparently randomly:

      Thread [main] (Suspended (entry into method <init> in ClosedByInterruptException))  
                      owns: Object  (id=405) 
                      owns: AbstractComponentSubManager$3  (id=406)       
                      owns: RunnableLock  (id=407)  
                      ClosedByInterruptException.<init>() line: 51      
                      FileChannelImpl(AbstractInterruptibleChannel).end(boolean) line: 202 
                      FileChannelImpl.size() line: 315
                      FileUtils.doCopyFile(File, File, boolean) line: 1145            
                      FileUtils.copyFile(File, File, boolean) line: 1088  
                      FileUtils.copyFile(File, File) line: 1040     
      ... Stack frames from my app...
      

      I want to workaround this by updating doCopyFile to use Java 7's Files.copy(Path,Path,CopyOptions) API.

      Attachments

        Issue Links

          Activity

            People

              ggregory Gary D. Gregory
              ggregory Gary D. Gregory
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: