[ 
https://issues.apache.org/jira/browse/LUCENE-5851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Miller resolved LUCENE-5851.
---------------------------------

    Resolution: Duplicate

> 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]

Reply via email to