You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Pierre Villard (Jira)" <ji...@apache.org> on 2020/09/24 10:31:00 UTC

[jira] [Created] (NIFI-7844) substring should return empty instead of throwing IndexOutOfBoundsException

Pierre Villard created NIFI-7844:
------------------------------------

             Summary: 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


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)