Wrong exception thrown?
John Hendrikx
hjohn at xs4all.nl
Sat Aug 29 07:01:32 PDT 2009
Exception in thread "Thread-8": java.nio.file.AccessDeniedException:
c:\Copy\Macros2 -> c:\Copy2\Macros2
at
sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:301)
at sun.nio.fs.WindowsPath.implMoveTo(WindowsPath.java:1004)
at sun.nio.fs.AbstractPath.moveTo(AbstractPath.java:201)
at
hs.filemanager.transfer.RenameFileVisitor.rename(RenameFileVisitor.java:67)
This occurs when moveTo() is called with the arguments indicated +
ATOMIC_MOVE.
I would expect the FileAlreadyExistsException to be thrown. It's not a
permission issue (and the files are not 'read only').
More information about the nio-dev
mailing list