lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r1361517 - /lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
Date Sat, 14 Jul 2012 10:25:08 GMT
Author: yonik
Date: Sat Jul 14 10:25:08 2012
New Revision: 1361517

URL: http://svn.apache.org/viewvc?rev=1361517&view=rev
Log:
tests: fix AIOOB if last list element is skipped

Modified:
    lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java

Modified: lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java?rev=1361517&r1=1361516&r2=1361517&view=diff
==============================================================================
--- lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
(original)
+++ lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
Sat Jul 14 10:25:08 2012
@@ -458,11 +458,11 @@ public abstract class BaseDistributedSea
         break;
       }
 
-      String namea, nameb;
-      Object vala, valb = null;
+      String namea = null, nameb = null;
+      Object vala = null, valb = null;
 
-      int flagsa, flagsb;
-      for (; ;) {
+      int flagsa = 0, flagsb = 0;
+      while (posa < a.size()) {
         namea = a.getName(posa);
         vala = a.getVal(posa);
         posa++;



Mime
View raw message