You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ahmet Arslan (JIRA)" <ji...@apache.org> on 2014/07/29 01:25:39 UTC
[jira] [Commented] (LUCENE-5851)
org.apache.lucene.analysis.ja.util.CSVUtil#quoteEscape uses String#replace
and ignores the returned value.
[ 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org