You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by pvillard31 <gi...@git.apache.org> on 2018/10/19 08:45:21 UTC

[GitHub] nifi pull request #3092: NIFI-5525 - CSVRecordReader fails with StringIndexO...

GitHub user pvillard31 opened a pull request:

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

    NIFI-5525 - CSVRecordReader fails with StringIndexOutOfBoundsExceptio…

    …n when field is a double quote
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


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

    $ git pull https://github.com/pvillard31/nifi NIFI-5525

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

    https://github.com/apache/nifi/pull/3092.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 #3092
    
----
commit 97ae7f8d7f5c03bf63ebcc7fee74780f9abf7954
Author: Pierre Villard <pi...@...>
Date:   2018-10-19T08:44:00Z

    NIFI-5525 - CSVRecordReader fails with StringIndexOutOfBoundsException when field is a double quote

----


---

[GitHub] nifi pull request #3092: NIFI-5525 - CSVRecordReader fails with StringIndexO...

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

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


---

[GitHub] nifi issue #3092: NIFI-5525 - CSVRecordReader fails with StringIndexOutOfBou...

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

    https://github.com/apache/nifi/pull/3092
  
    Pierre made the change Peter recommended (I verified). I think we need it in now as the current Jira is only partially complete for 1.8.0 without it.
    
    Peter, I'm going to go ahead and merge this so we can cut the RC, please let me know if you disagree and we can discuss further; otherwise I suspect we're good to go, thanks all!


---

[GitHub] nifi issue #3092: NIFI-5525 - CSVRecordReader fails with StringIndexOutOfBou...

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

    https://github.com/apache/nifi/pull/3092
  
    @patricker I'm hoping to get this PR merged in for NiFi 1.8.0 RC3 today.  Could you please check the newest changes and merge if you are a +1?


---

[GitHub] nifi pull request #3092: NIFI-5525 - CSVRecordReader fails with StringIndexO...

Posted by mattyb149 <gi...@git.apache.org>.
Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3092#discussion_r227045025
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/AbstractCSVRecordReader.java ---
    @@ -132,6 +131,10 @@ protected final Object convertSimpleIfPossible(final String value, final DataTyp
             return value;
         }
     
    +    private String trim(String value) {
    +        return value.startsWith("\"") && value.endsWith("\"") && (value.length() > 1) ? value.substring(1, value.length() - 1) : value;
    --- End diff --
    
    Doesn't seem like it would offer a significant performance improvement on average, only if most of the strings to be trimmed were single characters. I'm +1 on this one if you are, I can do the merge (to get this into 1.8.0 RC3) if you like.


---

[GitHub] nifi issue #3092: NIFI-5525 - CSVRecordReader fails with StringIndexOutOfBou...

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

    https://github.com/apache/nifi/pull/3092
  
    @patricker - thanks for the review, pushed a commit to address your comment


---