[
https://issues.apache.org/jira/browse/IO-748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dirk Heinrichs updated IO-748:
------------------------------
Description:
When executing
{code:java}
FileUtils.moveToDirectory(new File('foobarbaz'), new File('/tmp'), false){code}
while "foobarbaz" doesn't exist, I get
{code:java}
java.io.FileNotFoundException: Source 'foobarbaz' does not exist {code}
but the documentation doesn't mention "FileNotFoundException".
OTOH, if "foobarbaz" exists both as source and in the destination directory, I
get
{code:java}
org.apache.commons.io.FileExistsException: File element in parameter 'null'
already exists: '/tmp/foobarbaz'
{code}
What's that "parameter 'null'"?
was:
When executing
{code:java}
FileUtils.moveToDirectory(new File('foobarbaz'), new File('/tmp'), false){code}
while "foobarbaz" doesn't exist, I get
{code:java}
java.io.FileNotFoundException: Source 'foobarbaz' does not exist {code}
but the documentation doesn't mention "FileNotFoundException".
OTOH, if "foobarbaz" exists both as source and in the destination directory, I
get
{code:java}
org.apache.commons.io.FileExistsException: File element in parameter 'null'
already exists: '/tmp/foobarbaz'
{code}
What's hat "parameter 'null'"?
> FileUtils.moveToDirectory() exception documentation and exception message
> error
> -------------------------------------------------------------------------------
>
> Key: IO-748
> URL: https://issues.apache.org/jira/browse/IO-748
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 2.11.0
> Reporter: Dirk Heinrichs
> Priority: Major
>
> When executing
> {code:java}
> FileUtils.moveToDirectory(new File('foobarbaz'), new File('/tmp'),
> false){code}
> while "foobarbaz" doesn't exist, I get
> {code:java}
> java.io.FileNotFoundException: Source 'foobarbaz' does not exist {code}
> but the documentation doesn't mention "FileNotFoundException".
> OTOH, if "foobarbaz" exists both as source and in the destination directory,
> I get
> {code:java}
> org.apache.commons.io.FileExistsException: File element in parameter 'null'
> already exists: '/tmp/foobarbaz'
> {code}
> What's that "parameter 'null'"?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)