[ 
https://issues.apache.org/jira/browse/NIFI-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14574687#comment-14574687
 ] 

Mark Payne commented on NIFI-415:
---------------------------------

Joe,

I believe the case that prompted this ticket was that a FlowFile was coming 
into PutFile with an empty filename. PutFile then created the File object by 
concatenating that to the directory name, and that results simply in the 
directory name. When it attempts to write to that file, it failed because it 
was attempting to write to a directory. The error message then was confusing 
because it said that it could not write to "/a/b/c" (i.e., whatever the 
directory name was).

So the first thought was to modify PutFile so that it would just notice that 
the filename is empty and route to failure and log that the filename was empty 
(rather than just logging that it couldn't write to the directory, because that 
seemed like a weird bug in PutFile). But then I thought "Well, why do we even 
allow for an empty filename? That seems weird." So I created the ticket.

If you feel it's valid to have an empty filename then we can just update 
PutFile.

> Framework should not allow an empty filename to be set
> ------------------------------------------------------
>
>                 Key: NIFI-415
>                 URL: https://issues.apache.org/jira/browse/NIFI-415
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Minor
>              Labels: beginner
>
> StandardProcessSession and MockProcessSession should ignore the attribute if 
> set via setAttributes and should throw an Exception if set via setAttribute, 
> in the same manner as if attempting to set the "uuid" attribute of a flowfile.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to