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

ASF subversion and git services commented on NIFI-920:
------------------------------------------------------

Commit 104224343db5c39b240010b49c5e5b15ff4fe0f7 in nifi's branch refs/heads/0.x 
from Joe Gresock
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=1042243 ]

NIFI-920: Adding InvalidPathException handling to UnpackContent

Signed-off-by: Bryan Bende <[email protected]>


> UnpackContent can continuously rollback on java.nio.InvalidPathException
> ------------------------------------------------------------------------
>
>                 Key: NIFI-920
>                 URL: https://issues.apache.org/jira/browse/NIFI-920
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Brandon DeVries
>            Assignee: Joseph Gresock
>            Priority: Minor
>              Labels: patch
>             Fix For: 0.7.0
>
>         Attachments: 
> 0001-NIFI-920-Adding-InvalidPathException-handling-to-Unp.patch
>
>
> In UnpackContent, file.toPath() is called without catching 
> java.nio.file.InvalidPathException:
> https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java#L265#L266
> https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java#L316#L318
> This bubbles up out of the processor and causes a rollback, instead of simply 
> failing the file in the processor.  
> This could be fixed in each "Unpacker" implementation (possibly by catching 
> and wrapping in a ProcessException), or the catch in the OnTrigger method 
> here:
> https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java#L238
> ... could simply be changed to "catch (final ProcessException | 
> InvalidPathException e)".  Whoever implements the fix can think that all the 
> way through.



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

Reply via email to