You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by bu...@apache.org on 2003/10/24 17:07:59 UTC

DO NOT REPLY [Bug 24105] New: - In FileSource.FileSourceOutputStream return value of File.renameTo ist ignored

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24105>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24105

In FileSource.FileSourceOutputStream return value of File.renameTo ist ignored

           Summary: In FileSource.FileSourceOutputStream return value of
                    File.renameTo ist ignored
           Product: Avalon
           Version: unspecified
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Excalibur
        AssignedTo: dev@avalon.apache.org
        ReportedBy: jal@argo-tec.de


In method close() of the inner class FileSourceOutputStream of class FileSource 
a temporary file is renamed to the name of the original file. However, the 
return value of java.io.File.renameTo is ignored. Rather it should interpret 
the return value and raise an appropriate exception. For example:

if (!m_tmpFile.renameTo(m_source.getFile())) {
   throw new IOException("Could not rename " + 
     m_tmpFile.getAbsolutePath() + 
     " to " + m_source.getFile().getAbsolutePath());
}

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org