You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Luke Quinane (JIRA)" <ji...@apache.org> on 2011/05/05 03:27:03 UTC

[jira] [Created] (IO-270) "IllegalArgumentException: Negative time" copying to Windows share

"IllegalArgumentException: Negative time" copying to Windows share
------------------------------------------------------------------

                 Key: IO-270
                 URL: https://issues.apache.org/jira/browse/IO-270
             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 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>{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: http://www.atlassian.com/software/jira

[jira] [Closed] (IO-270) "IllegalArgumentException: Negative time" copying to Windows share

Posted by "Henri Yandell (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell closed IO-270.
----------------------------

    Resolution: Incomplete

Closing as Incomplete. Not enough info to work on.
                
> "IllegalArgumentException: Negative time" copying to Windows share
> ------------------------------------------------------------------
>
>                 Key: IO-270
>                 URL: https://issues.apache.org/jira/browse/IO-270
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 1.4
>         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 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>{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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (IO-270) "IllegalArgumentException: Negative time" copying to Windows share

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029097#comment-13029097 ] 

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 java.io.File 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: https://issues.apache.org/jira/browse/IO-270
>             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 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>{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: http://www.atlassian.com/software/jira

[jira] [Updated] (IO-270) "IllegalArgumentException: Negative time" copying to Windows share

Posted by "Luke Quinane (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luke Quinane updated IO-270:
----------------------------

    Affects Version/s:     (was: 2.0.1)
                       1.4

> "IllegalArgumentException: Negative time" copying to Windows share
> ------------------------------------------------------------------
>
>                 Key: IO-270
>                 URL: https://issues.apache.org/jira/browse/IO-270
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 1.4
>         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 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>{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: http://www.atlassian.com/software/jira

[jira] [Commented] (IO-270) "IllegalArgumentException: Negative time" copying to Windows share

Posted by "Luke Quinane (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029105#comment-13029105 ] 

Luke Quinane commented on IO-270:
---------------------------------

Ah, indeed; we have upgraded to 2.01 in our trunk but the released version was 1.4. Sorry about that.

Its unlikely that it will be possible to run a test but I'll try to get some more details about what is on the other end of the network connection.

> "IllegalArgumentException: Negative time" copying to Windows share
> ------------------------------------------------------------------
>
>                 Key: IO-270
>                 URL: https://issues.apache.org/jira/browse/IO-270
>             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 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>{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: http://www.atlassian.com/software/jira