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

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

Commit f32405ed16b7e07a0d445f1ed19032acaf33246d in nifi's branch 
refs/heads/main from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=f32405e ]

NIFI-7844 - substring should return empty instead of throwing 
IndexOutOfBoundsException

This closes #4553

Signed-off-by: Mike Thomsen <mthom...@apache.org>


> substring should return empty instead of throwing IndexOutOfBoundsException
> ---------------------------------------------------------------------------
>
>                 Key: NIFI-7844
>                 URL: https://issues.apache.org/jira/browse/NIFI-7844
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>            Reporter: Pierre Villard
>            Assignee: Pierre Villard
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> In the expression language, right now, for the substring function:
> {quote}If the _starting index_ or the _ending index_ is greater than the 
> length of the Subject or has a value less than 0, this function call will 
> result in an error.
> {quote}
> I suggest to change this behavior and return an empty string instead. Reason 
> being that with the current behavior, an UpdateAttribute would fail and roll 
> back the flow file in the incoming relationship, this could cause back 
> pressure and completely block the whole flow to be running.
> It might be worth mentioning it in the migration guide as this changes the 
> current behavior but I still think this is a reasonable change.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to