Mark Miller created LUCENE-5851:
-----------------------------------
Summary: 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]