commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] [Commented] (IO-270) "IllegalArgumentException: Negative time" copying to Windows share
Date Thu, 05 May 2011 01:52:03 GMT


Sebb commented on IO-270:

The line numbers do not agree with IO 2.0.1 - are you sure that is the version being used?

Assuming that the version is actually 1.4 (which does agree) the line at 686 is:

bq. destFile.setLastModified(srcFile.lastModified());

which means that the input file has a lastModified date which is negative.

Now according to the Javadoc, that is not possible - looks as if there may be
a JVM bug here.

Is it possible to run a simple Java program to test the value of lastModified() on the file
that fails?

> "IllegalArgumentException: Negative time" copying to Windows share
> ------------------------------------------------------------------
>                 Key: IO-270
>                 URL:
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.0.1
>         Environment: Windows 7, Java 64 bit server v1.6.0_22-b04
>            Reporter: Luke Quinane
> A customer reported the following exception to us:
> {noformat}java.lang.IllegalArgumentException: Negative time
>       at
>       at
>       at
>       at
>       at <in house code>{noformat}
> Part of the problem is the exception itself but also our code was expecting FileUtils
to throw IOException instead of ISE.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message