lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r824045 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java src/webapp/web/admin/analysis.jsp
Date Sun, 11 Oct 2009 10:04:02 GMT
Author: koji
Date: Sun Oct 11 10:04:01 2009
New Revision: 824045

URL: http://svn.apache.org/viewvc?rev=824045&view=rev
Log:
SOLR-1504: empty char mapping can cause ArrayIndexOutOfBoundsException in analysis.jsp and
co.

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java
    lucene/solr/trunk/src/webapp/web/admin/analysis.jsp

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=824045&r1=824044&r2=824045&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Sun Oct 11 10:04:01 2009
@@ -622,6 +622,9 @@
 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)

Modified: lucene/solr/trunk/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java?rev=824045&r1=824044&r2=824045&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java Sun
Oct 11 10:04:01 2009
@@ -216,7 +216,8 @@
       } catch (IOException e) {
         throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, e);
       }
-      sb.append(buf, 0, len);
+      if( len > 0 )
+        sb.append(buf, 0, len);
     } while( len == BUFFER_SIZE );
     out.add( input.getClass().getName(), sb.toString());
     return sb.toString();

Modified: lucene/solr/trunk/src/webapp/web/admin/analysis.jsp
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/webapp/web/admin/analysis.jsp?rev=824045&r1=824044&r2=824045&view=diff
==============================================================================
--- lucene/solr/trunk/src/webapp/web/admin/analysis.jsp (original)
+++ lucene/solr/trunk/src/webapp/web/admin/analysis.jsp Sun Oct 11 10:04:01 2009
@@ -483,7 +483,8 @@
     StringBuilder sb = new StringBuilder();
     do {
       len = input.read( buf, 0, BUFFER_SIZE );
-      sb.append(buf, 0, len);
+      if( len > 0 )
+        sb.append(buf, 0, len);
     } while( len == BUFFER_SIZE );
     out.print("<td class=\"debugdata\">");
     XML.escapeCharData(sb.toString(),out);



Mime
View raw message