[
https://issues.apache.org/jira/browse/LUCENE-5851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14077120#comment-14077120
]
Ahmet Arslan commented on LUCENE-5851:
--------------------------------------
duplicate of LUCENE-5506 ?
> org.apache.lucene.analysis.ja.util.CSVUtil#quoteEscape uses String#replace
> and ignores the returned value.
> ----------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-5851
> URL: https://issues.apache.org/jira/browse/LUCENE-5851
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Mark Miller
> Priority: Minor
>
> {code}
> /**
> * Quote and escape input value for CSV
> */
> public static String quoteEscape(String original) {
> String result = original;
>
> if (result.indexOf('\"') >= 0) {
> result.replace("\"", ESCAPED_QUOTE);
> }
> if(result.indexOf(COMMA) >= 0) {
> result = "\"" + result + "\"";
> }
> return result;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]