Skip to content

Commit 00f26f7

Browse files
committed
Fixed bug parsing column with a single double-quote character in the CSV class
1 parent 2004540 commit 00f26f7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/javaxt/express/utils/CSV.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,13 @@ private static javaxt.utils.Value getValue(StringBuilder str){
320320
if (col.length()==0) col = null;
321321
if (col!=null){
322322
if (col.startsWith("\"") && col.endsWith("\"")){
323-
col = col.substring(1, col.length()-1).trim();
324-
if (col.length()==0) col = null;
323+
if (col.length()>1){
324+
col = col.substring(1, col.length()-1).trim();
325+
if (col.length()==0) col = null;
326+
}
327+
else{
328+
col = null;
329+
}
325330
}
326331
}
327332
return new javaxt.utils.Value(col);

0 commit comments

Comments
 (0)