Return-Path: Delivered-To: apmail-lucene-java-commits-archive@www.apache.org Received: (qmail 68351 invoked from network); 16 Jan 2010 18:42:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Jan 2010 18:42:14 -0000 Received: (qmail 86699 invoked by uid 500); 16 Jan 2010 18:42:14 -0000 Delivered-To: apmail-lucene-java-commits-archive@lucene.apache.org Received: (qmail 86623 invoked by uid 500); 16 Jan 2010 18:42:14 -0000 Mailing-List: contact java-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-commits@lucene.apache.org Received: (qmail 86614 invoked by uid 99); 16 Jan 2010 18:42:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Jan 2010 18:42:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Jan 2010 18:42:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6C24F2388978; Sat, 16 Jan 2010 18:41:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r900010 - /lucene/java/trunk/src/java/org/apache/lucene/util/SortedVIntList.java Date: Sat, 16 Jan 2010 18:41:51 -0000 To: java-commits@lucene.apache.org From: mikemccand@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100116184151.6C24F2388978@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mikemccand Date: Sat Jan 16 18:41:51 2010 New Revision: 900010 URL: http://svn.apache.org/viewvc?rev=900010&view=rev Log: LUCENE-2217: use ArrayUtil.getNextSize when growing Modified: lucene/java/trunk/src/java/org/apache/lucene/util/SortedVIntList.java Modified: lucene/java/trunk/src/java/org/apache/lucene/util/SortedVIntList.java URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/util/SortedVIntList.java?rev=900010&r1=900009&r2=900010&view=diff ============================================================================== --- lucene/java/trunk/src/java/org/apache/lucene/util/SortedVIntList.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/util/SortedVIntList.java Sat Jan 16 18:41:51 2010 @@ -128,8 +128,10 @@ } if ((lastBytePos + MAX_BYTES_PER_INT) > bytes.length) { - // biggest possible int does not fit - resizeBytes((bytes.length * 2) + MAX_BYTES_PER_INT); + // Biggest possible int does not fit. + // Requires initial size of at least 9, + // see SortedVIntList.initBytes() and ArrayUtil.getNextSize() + ArrayUtil.getNextSize(bytes.length); } // See org.apache.lucene.store.IndexOutput.writeVInt()