You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ken Krugler (JIRA)" <ji...@apache.org> on 2010/12/03 20:07:11 UTC

[jira] Created: (SOLR-2264) CSVRequestHandler can throw NPE when no escape parameter is specified for splitting

CSVRequestHandler can throw NPE when no escape parameter is specified for splitting
-----------------------------------------------------------------------------------

                 Key: SOLR-2264
                 URL: https://issues.apache.org/jira/browse/SOLR-2264
             Project: Solr
          Issue Type: Bug
          Components: update
    Affects Versions: 1.4.1
            Reporter: Ken Krugler
            Priority: Minor


If you specify f.<fieldname>.split=true but don't specify anything else, you get a NPE:

java.lang.NullPointerException
	at org.apache.solr.handler.CSVLoader.prepareFields(CSVRequestHandler.java:310)
	at org.apache.solr.handler.CSVLoader.&lt;init&gt;(CSVRequestHandler.java:259)
	at org.apache.solr.handler.SingleThreadedCSVLoader.&lt;init&gt;(CSVRequestHandler.java:394)
	at org.apache.solr.handler.CSVRequestHandler.newLoader(CSVRequestHandler.java:46)

Line 310 in CSVRequestHandler.java has this:

        char fesc = escStr==null || encStr.length()==0 ? CSVStrategy.ESCAPE_DISABLED : escStr.charAt(0);

Note that "encStr.length()" should be "escStr.length()"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Resolved: (SOLR-2264) CSVRequestHandler can throw NPE when no escape parameter is specified for splitting

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley resolved SOLR-2264.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
                   3.1
                   1.4.2

Committed - thanks Ken!

> CSVRequestHandler can throw NPE when no escape parameter is specified for splitting
> -----------------------------------------------------------------------------------
>
>                 Key: SOLR-2264
>                 URL: https://issues.apache.org/jira/browse/SOLR-2264
>             Project: Solr
>          Issue Type: Bug
>          Components: update
>    Affects Versions: 1.4.1
>            Reporter: Ken Krugler
>            Priority: Minor
>             Fix For: 1.4.2, 3.1, 4.0
>
>
> If you specify f.<fieldname>.split=true but don't specify anything else, you get a NPE:
> java.lang.NullPointerException
> 	at org.apache.solr.handler.CSVLoader.prepareFields(CSVRequestHandler.java:310)
> 	at org.apache.solr.handler.CSVLoader.&lt;init&gt;(CSVRequestHandler.java:259)
> 	at org.apache.solr.handler.SingleThreadedCSVLoader.&lt;init&gt;(CSVRequestHandler.java:394)
> 	at org.apache.solr.handler.CSVRequestHandler.newLoader(CSVRequestHandler.java:46)
> Line 310 in CSVRequestHandler.java has this:
>         char fesc = escStr==null || encStr.length()==0 ? CSVStrategy.ESCAPE_DISABLED : escStr.charAt(0);
> Note that "encStr.length()" should be "escStr.length()"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org