SOLR-1504: empty char mapping can cause ArrayIndexOutOfBoundsException in analysis.jsp and co.

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@824045 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Koji Sekiguchi 2009-10-11 10:04:01 +00:00
parent 83fa285c40
commit 4f1bbb5e87
3 changed files with 7 additions and 2 deletions

View File

@ -622,6 +622,9 @@ Bug Fixes
71. SOLR-1448: Add weblogic.xml to solr webapp to enable correct operation in
WebLogic. (Ilan Rabinovitch via yonik)
72. SOLR-1504: empty char mapping can cause ArrayIndexOutOfBoundsException in analysis.jsp and co.
(koji)
Other Changes
----------------------
1. Upgraded to Lucene 2.4.0 (yonik)

View File

@ -216,6 +216,7 @@ public abstract class AnalysisRequestHandlerBase extends RequestHandlerBase {
} catch (IOException e) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, e);
}
if( len > 0 )
sb.append(buf, 0, len);
} while( len == BUFFER_SIZE );
out.add( input.getClass().getName(), sb.toString());

View File

@ -483,6 +483,7 @@
StringBuilder sb = new StringBuilder();
do {
len = input.read( buf, 0, BUFFER_SIZE );
if( len > 0 )
sb.append(buf, 0, len);
} while( len == BUFFER_SIZE );
out.print("<td class=\"debugdata\">");