From 6d4867eca0ac9f562d89ad8ade5c3bb4067f69af Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Fri, 3 Dec 2010 19:29:30 +0000 Subject: [PATCH] SOLR-2264: CSVRequestHandler can throw NPE when no escape parameter is specified for splitting git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1041963 13f79535-47bb-0310-9956-ffa450edef68 --- solr/src/java/org/apache/solr/handler/CSVRequestHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java b/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java index 2bef11cf70f..b46eb41cb9f 100755 --- a/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java +++ b/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java @@ -307,7 +307,7 @@ abstract class CSVLoader extends ContentStreamLoader { String encStr = params.getFieldParam(fname,ENCAPSULATOR); char fenc = encStr==null || encStr.length()==0 ? (char)-2 : encStr.charAt(0); String escStr = params.getFieldParam(fname,ESCAPE); - char fesc = escStr==null || encStr.length()==0 ? CSVStrategy.ESCAPE_DISABLED : escStr.charAt(0); + char fesc = escStr==null || escStr.length()==0 ? CSVStrategy.ESCAPE_DISABLED : escStr.charAt(0); CSVStrategy fstrat = new CSVStrategy(fsep,fenc,CSVStrategy.COMMENTS_DISABLED,fesc, false, false, false, false); adders[i] = new CSVLoader.FieldSplitter(fstrat, adders[i]);