lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r723149 - in /lucene/java/trunk/src/java/org/apache/lucene: index/MergeDocIDRemapper.java index/MultiSegmentReader.java index/TermInfosReader.java search/FieldCache.java search/MultiSearcher.java
Date Wed, 03 Dec 2008 23:46:20 GMT
Author: mikemccand
Date: Wed Dec  3 15:46:19 2008
New Revision: 723149

URL: http://svn.apache.org/viewvc?rev=723149&view=rev
Log:
LUCENE-1457: fix possible overflow bugs during binary search

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/index/MergeDocIDRemapper.java
    lucene/java/trunk/src/java/org/apache/lucene/index/MultiSegmentReader.java
    lucene/java/trunk/src/java/org/apache/lucene/index/TermInfosReader.java
    lucene/java/trunk/src/java/org/apache/lucene/search/FieldCache.java
    lucene/java/trunk/src/java/org/apache/lucene/search/MultiSearcher.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/MergeDocIDRemapper.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/MergeDocIDRemapper.java?rev=723149&r1=723148&r2=723149&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/MergeDocIDRemapper.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/MergeDocIDRemapper.java Wed Dec  3
15:46:19 2008
@@ -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/trunk/src/java/org/apache/lucene/index/MultiSegmentReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/MultiSegmentReader.java?rev=723149&r1=723148&r2=723149&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/MultiSegmentReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/MultiSegmentReader.java Wed Dec  3
15:46:19 2008
@@ -295,7 +295,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/trunk/src/java/org/apache/lucene/index/TermInfosReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/TermInfosReader.java?rev=723149&r1=723148&r2=723149&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/TermInfosReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/TermInfosReader.java Wed Dec  3 15:46:19
2008
@@ -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/trunk/src/java/org/apache/lucene/search/FieldCache.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FieldCache.java?rev=723149&r1=723148&r2=723149&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FieldCache.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FieldCache.java Wed Dec  3 15:46:19
2008
@@ -48,7 +48,7 @@
       int high = lookup.length-1;
 
       while (low <= high) {
-        int mid = (low + high) >> 1;
+        int mid = (low + high) >>> 1;
         int cmp = lookup[mid].compareTo(key);
 
         if (cmp < 0)

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/MultiSearcher.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/MultiSearcher.java?rev=723149&r1=723148&r2=723149&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/MultiSearcher.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/MultiSearcher.java Wed Dec  3 15:46:19
2008
@@ -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