Remove dependency on Java 1.4.2. Stick with Java 1.3.1.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@612746 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ee3839f5f4
commit
57c6a6e832
|
@ -42,6 +42,7 @@ public class StringEscapeUtils {
|
||||||
|
|
||||||
private static final char CSV_DELIMITER = ',';
|
private static final char CSV_DELIMITER = ',';
|
||||||
private static final char CSV_QUOTE = '"';
|
private static final char CSV_QUOTE = '"';
|
||||||
|
private static final String CSV_QUOTE_STR = String.valueOf(CSV_QUOTE);
|
||||||
private static final char[] CSV_SEARCH_CHARS = new char[] {CSV_DELIMITER, CSV_QUOTE, CharUtils.CR, CharUtils.LF};
|
private static final char[] CSV_SEARCH_CHARS = new char[] {CSV_DELIMITER, CSV_QUOTE, CharUtils.CR, CharUtils.LF};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -850,7 +851,7 @@ public class StringEscapeUtils {
|
||||||
|
|
||||||
if ( StringUtils.containsAny(quoteless, CSV_SEARCH_CHARS) ) {
|
if ( StringUtils.containsAny(quoteless, CSV_SEARCH_CHARS) ) {
|
||||||
// deal with escaped quotes; ie) ""
|
// deal with escaped quotes; ie) ""
|
||||||
str = StringUtils.replace(quoteless, "" + CSV_QUOTE + CSV_QUOTE, Character.toString(CSV_QUOTE));
|
str = StringUtils.replace(quoteless, "" + CSV_QUOTE + CSV_QUOTE, CSV_QUOTE_STR);
|
||||||
}
|
}
|
||||||
|
|
||||||
out.write(str);
|
out.write(str);
|
||||||
|
|
Loading…
Reference in New Issue