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:
Gary D. Gregory 2008-01-17 07:54:21 +00:00
parent ee3839f5f4
commit 57c6a6e832
1 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ public class StringEscapeUtils {
private static final char CSV_DELIMITER = ',';
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};
/**
@ -850,7 +851,7 @@ public static void unescapeCsv(Writer out, String str) throws IOException {
if ( StringUtils.containsAny(quoteless, CSV_SEARCH_CHARS) ) {
// 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);