You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by devin-fisher <gi...@git.apache.org> on 2016/08/10 21:52:53 UTC

[GitHub] nifi pull request #833: Add String Escape Utils to Nifi Expression Language ...

GitHub user devin-fisher opened a pull request:

    https://github.com/apache/nifi/pull/833

    Add String Escape Utils to Nifi Expression Language (redo)

    jira:[NIFI-2460](https://issues.apache.org/jira/browse/NIFI-2460)
    
    Added functions to escape and unescape common transport formats that are supported by common-lang's [StringEscapeUtils](https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringEscapeUtils.html).
    
    Since I added ten functions, I created a new section in the Documentation. I also moved URL encode and decode there too.
    
    Don't add a lot of unit tests since I'm directly piping it through to [StringEscapeUtils](https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringEscapeUtils.html) and they have extensive testing [there](https://github.com/apache/commons-lang/blob/master/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java).  The test are most to verify that it is going to the right function.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/devin-fisher/nifi add_escape_utils

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/833.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #833
    
----
commit e5c9bc957d7eff6a70728c778bd3e065e78b7cdd
Author: Devin Fisher <de...@gmail.com>
Date:   2016-07-02T23:53:16Z

    EscapeJson function added to expression-language
    
    Made use of org.apache.commons.lang3.StringEscapeUtils to do that
    actual processing

commit 46f91a23e680be9bded1687070d5b1195c73e88e
Author: Devin Fisher <de...@gmail.com>
Date:   2016-07-03T12:45:09Z

    fix a copy past error

commit 3074072d7920bf762e410400f9fe27aa94e9d2d9
Author: devin fisher <de...@gmail.com>
Date:   2016-07-28T03:17:39Z

    added functions for escaping text to the expression language

commit 5362b5b2b016b333d948326fbb2244e7fab7297a
Author: devin fisher <de...@gmail.com>
Date:   2016-07-28T04:18:50Z

    Added more test for escape and unescape functions

commit 663960f67619d92d2dd6c18157de4975e6736ced
Author: Devin Fisher <de...@gmail.com>
Date:   2016-07-28T23:23:41Z

    Added documentation for the new expression language functions for escapes

commit 48823a00ae8af3cf80727246132d669fd85ec3bc
Author: Devin Fisher <de...@gmail.com>
Date:   2016-08-10T21:41:04Z

    Changed the heading for doc to encode instead of escape

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #833: Add String Escape Utils to Nifi Expression Language (redo)

Posted by joewitt <gi...@git.apache.org>.
Github user joewitt commented on the issue:

    https://github.com/apache/nifi/pull/833
  
    @devin-fisher awesome how responsive you have been on this!  Makes review/commit process much easier!  Thank you


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #833: Add String Escape Utils to Nifi Expression Language (redo)

Posted by devin-fisher <gi...@git.apache.org>.
Github user devin-fisher commented on the issue:

    https://github.com/apache/nifi/pull/833
  
    This a redo for PR 777


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #833: Add String Escape Utils to Nifi Expression Language (redo)

Posted by mattyb149 <gi...@git.apache.org>.
Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/833
  
    +1 Great job! I built, ran, and tested the functions with escaped/unescaped inputs and empty strings, everything works well.  Thanks again for the contribution! Will merge to master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #833: Add String Escape Utils to Nifi Expression Language (redo)

Posted by devin-fisher <gi...@git.apache.org>.
Github user devin-fisher commented on the issue:

    https://github.com/apache/nifi/pull/833
  
    Ok, fixed those errors and it now passes the contrib-check.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #833: Add String Escape Utils to Nifi Expression Language ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/833


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #833: Add String Escape Utils to Nifi Expression Language (redo)

Posted by mattyb149 <gi...@git.apache.org>.
Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/833
  
    I'm seeing CheckStyle errors:
    
    [INFO] --- maven-checkstyle-plugin:2.15:check (check-style) @ nifi-expression-language ---
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[12] (regexp) RegexpSinglelineJava: Line has trailing whitespace.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[13:1] (blocks) LeftCurly: '{' should be on the previous line.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[15:5] (whitespace) FileTabCharacter: Line contains a tab character.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[17] (regexp) RegexpSinglelineJava: Line has trailing whitespace.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[19:5] (whitespace) FileTabCharacter: Line contains a tab character.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[21] (regexp) RegexpSinglelineJava: Line has trailing whitespace.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[23:5] (whitespace) FileTabCharacter: Line contains a tab character.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[27:5] (whitespace) FileTabCharacter: Line contains a tab character.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[29] (regexp) RegexpSinglelineJava: Line has trailing whitespace.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[31:5] (whitespace) FileTabCharacter: Line contains a tab character.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[33] (regexp) RegexpSinglelineJava: Line has trailing whitespace.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[35:5] (whitespace) FileTabCharacter: Line contains a tab character.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[37] (regexp) RegexpSinglelineJava: Line has trailing whitespace.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[39:5] (whitespace) FileTabCharacter: Line contains a tab character.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[41] (regexp) RegexpSinglelineJava: Line has trailing whitespace.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[43:5] (whitespace) FileTabCharacter: Line contains a tab character.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[47:5] (whitespace) FileTabCharacter: Line contains a tab character.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[49] (regexp) RegexpSinglelineJava: Line has trailing whitespace.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[51:5] (whitespace) FileTabCharacter: Line contains a tab character.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[53] (regexp) RegexpSinglelineJava: Line has trailing whitespace.
    [WARNING] src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/CharSequenceTranslatorEvaluator.java[54] (regexp) RegexpSinglelineJava: Line has trailing whitespace.
    
    Can you format this file? You can check to see if there are errors by going to the nifi-commons/nifi-expression-language module and running "mvn clean install -Pcontrib-check".


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #833: Add String Escape Utils to Nifi Expression Language (redo)

Posted by mattyb149 <gi...@git.apache.org>.
Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/833
  
    Reviewing...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---