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

"IllegalArgumentException: Negative time" copying to Windows share

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 1.4
    • None
    • Utilities
    • None
    • Windows 7, Java 64 bit server v1.6.0_22-b04

    Description

      A customer reported the following exception to us:

      java.lang.IllegalArgumentException: Negative time
            at java.io.File.setLastModified(File.java:1258)
            at org.apache.commons.io.FileUtils.doCopyFile(FileUtils.java:686)
            at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:653)
            at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:607)
            at <in house code>

      Part of the problem is the exception itself but also our code was expecting FileUtils to throw IOException instead of ISE.

      Attachments

        Activity

          People

            Unassigned Unassigned
            luke-nuix Luke Quinane
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: