[ 
https://issues.apache.org/jira/browse/NIFI-7844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard updated NIFI-7844:
---------------------------------
    Fix Version/s: 1.13.0

> 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
>             Fix For: 1.13.0
>
>          Time Spent: 0.5h
>  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