Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3112#discussion_r228781049
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceText.java
 ---
    @@ -297,16 +297,27 @@ public void onTrigger(final ProcessContext context, 
final ProcessSession session
             } catch (StackOverflowError e) {
                 // Some regular expressions can produce many matches on large 
input data size using recursive code
                 // do not log the StackOverflowError stack trace
    -            logger.info("Transferred {} to 'failure' due to {}", new 
Object[] {flowFile, e.toString()});
    -            session.transfer(flowFile, REL_FAILURE);
    +            sendToFailure(session, flowFile, logger, e);
    +            return;
    +        } catch (RuntimeException e) {
    --- End diff --
    
    Please use following code instead of using String.startWith:
    ```suggestion
            } catch 
(AttributeExpressionLanguageException|IllegalAttributeException e) {
    ```
    
    I assume the intent of using startWith is catching both 
AttributeExpressionLanguageException and IllegalAttributeException without 
adding nifi-expression-language dependency. But having explicit dependency is 
preferable as it's more maintainable.


---

Reply via email to