You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2018/05/21 23:21:00 UTC

[jira] [Comment Edited] (IO-577) Add readers to filter out given characters

    [ https://issues.apache.org/jira/browse/IO-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483193#comment-16483193 ] 

Gary Gregory edited comment on IO-577 at 5/21/18 11:20 PM:
-----------------------------------------------------------

Thank you all for the review.
[~kinow]:
{quote}
In CharacterSetFilterReader, maybe remove private static final HashSet<Integer> EMPTY_SET = new HashSet<>(0); ? And perhaps use Collections.emptySet() ?
{quote}
Yes, good catch.
{quote}
Also in CharacterSetFilterReader, I think it could be dangerous just using the collection provided by the user. Maybe create a new field using Collections.unmodifiableSet(originalSet) ?
{quote}
Yes, good catch.

[~sebb@apache.org]:
Yes, this solution is broader but simpler for the case of CSV-222 IMO. I like it because it does not make the CSV lexer more complex.



was (Author: garydgregory):
Thank you all for the review.
[~kinow]:
{quote}
In CharacterSetFilterReader, maybe remove private static final HashSet<Integer> EMPTY_SET = new HashSet<>(0); ? And perhaps use Collections.emptySet() ?
{quote}
Yes, good catch.
{quote}
Also in CharacterSetFilterReader, I think it could be dangerous just using the collection provided by the user. Maybe create a new field using Collections.unmodifiableSet(originalSet) ?
{quote}
Yes, good catch.

[~sebb@apache.org]:
Yes, this solution is broader but simpler for the case of CSV-222. I like it because it does not make the CSV lexer more complex.


> Add readers to filter out given characters
> ------------------------------------------
>
>                 Key: IO-577
>                 URL: https://issues.apache.org/jira/browse/IO-577
>             Project: Commons IO
>          Issue Type: New Feature
>          Components: Filters
>            Reporter: Gary Gregory
>            Priority: Major
>         Attachments: commons-io-577.patch
>
>
> Add readers to filter out given characters,  handy to remove known junk characters from CSV files for example. Please see attached.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)