lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r745798 - in /lucene/java/branches/lucene_2_4: ./ src/java/org/apache/lucene/index/ src/java/org/apache/lucene/search/
Date Thu, 19 Feb 2009 09:59:41 GMT
Author: mikemccand
Date: Thu Feb 19 09:59:40 2009
New Revision: 745798

URL: http://svn.apache.org/viewvc?rev=745798&view=rev
Log:
LUCENE-1457 (on 2.4 branch): fix possible int overflow bugs in binary searches

Modified:
    lucene/java/branches/lucene_2_4/   (props changed)
    lucene/java/branches/lucene_2_4/CHANGES.txt
    lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/MergeDocIDRemapper.java
    lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/MultiSegmentReader.java
    lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/TermInfosReader.java
    lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/search/MultiSearcher.java

Propchange: lucene/java/branches/lucene_2_4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 19 09:59:40 2009
@@ -1 +1 @@
-/lucene/java/trunk:708549,709456,712233,718540
+/lucene/java/trunk:708549,709456,712233,718540,723149

Modified: lucene/java/branches/lucene_2_4/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/CHANGES.txt?rev=745798&r1=745797&r2=745798&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/CHANGES.txt (original)
+++ lucene/java/branches/lucene_2_4/CHANGES.txt Thu Feb 19 09:59:40 2009
@@ -31,6 +31,9 @@
    happen if you use IndexReader.open with a File or String argument.
    (Mark Miller via Mike McCandless)
 
+7. LUCENE-1457: Fix possible overflow bugs during binary
+   searches. (Mark Miller via Mike McCandless)
+
 
 ======================= Release 2.4.0 2008-10-06 =======================
 

Modified: lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/MergeDocIDRemapper.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/MergeDocIDRemapper.java?rev=745798&r1=745797&r2=745798&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/MergeDocIDRemapper.java
(original)
+++ lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/MergeDocIDRemapper.java
Thu Feb 19 09:59:40 2009
@@ -85,7 +85,7 @@
       int hi = docMaps.length - 1;                  // for first element less
 
       while (hi >= lo) {
-        int mid = (lo + hi) >> 1;
+        int mid = (lo + hi) >>> 1;
         int midValue = starts[mid];
         if (oldDocID < midValue)
           hi = mid - 1;

Modified: lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/MultiSegmentReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/MultiSegmentReader.java?rev=745798&r1=745797&r2=745798&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/MultiSegmentReader.java
(original)
+++ lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/MultiSegmentReader.java
Thu Feb 19 09:59:40 2009
@@ -19,7 +19,6 @@
 
 import java.io.IOException;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -295,7 +294,7 @@
     int hi = numSubReaders - 1;                  // for first element less
 
     while (hi >= lo) {
-      int mid = (lo + hi) >> 1;
+      int mid = (lo + hi) >>> 1;
       int midValue = starts[mid];
       if (n < midValue)
         hi = mid - 1;

Modified: lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/TermInfosReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/TermInfosReader.java?rev=745798&r1=745797&r2=745798&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/TermInfosReader.java
(original)
+++ lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/TermInfosReader.java
Thu Feb 19 09:59:40 2009
@@ -195,7 +195,7 @@
     int hi = indexTerms.length - 1;
 
     while (hi >= lo) {
-      int mid = (lo + hi) >> 1;
+      int mid = (lo + hi) >>> 1;
       int delta = term.compareTo(indexTerms[mid]);
       if (delta < 0)
 	hi = mid - 1;

Modified: lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/search/MultiSearcher.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/search/MultiSearcher.java?rev=745798&r1=745797&r2=745798&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/search/MultiSearcher.java (original)
+++ lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/search/MultiSearcher.java Thu
Feb 19 09:59:40 2009
@@ -168,7 +168,7 @@
     int hi = searchables.length - 1;		  // for first element less
 						  // than n, return its index
     while (hi >= lo) {
-      int mid = (lo + hi) >> 1;
+      int mid = (lo + hi) >>> 1;
       int midValue = starts[mid];
       if (n < midValue)
 	hi = mid - 1;



Mime
View raw message