lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <>
Subject [jira] [Created] (LUCENE-4439) IOUtils.copy stops copying when returns 0
Date Wed, 26 Sep 2012 14:03:07 GMT
Adrien Grand created LUCENE-4439:

             Summary: IOUtils.copy stops copying when returns 0
                 Key: LUCENE-4439
             Project: Lucene - Core
          Issue Type: Bug
    Affects Versions: 4.0
            Reporter: Adrien Grand
            Priority: Minor
             Fix For: 4.1, 5.0

IOUtils.copy has the following lines of code:
      while ((len = > 0) {
        fos.write(buffer, 0, len);

The problem is that the fact that {{}} returns 0 does not mean that it reached
the end of the stream (there is -1 for this), so this method might not copy the whole file
in rare cases.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message