lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <ser...@gmail.com>
Subject Re: svn commit: r953986 - /lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SegmentInfo.java
Date Sat, 12 Jun 2010 11:12:16 GMT
Yes .. we should just make it a code practice - never assert on is.read() /
os.write() :).

I hope this is the sort of bugs that you get to introduce only once :).

Shai

On Sat, Jun 12, 2010 at 2:03 PM, Uwe Schindler <uwe@thetaphi.de> wrote:

> This is hard to find! It only fails with disabled assertions, so the lucene
> test suite always passes - ugly :(
>
> Thanks!
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
> > -----Original Message-----
> > From: shaie@apache.org [mailto:shaie@apache.org]
> > Sent: Saturday, June 12, 2010 12:48 PM
> > To: commits@lucene.apache.org
> > Subject: svn commit: r953986 -
> > /lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SegmentInfo.
> > java
> >
> > Author: shaie
> > Date: Sat Jun 12 10:47:35 2010
> > New Revision: 953986
> >
> > URL: http://svn.apache.org/viewvc?rev=953986&view=rev
> > Log:
> > LUCENE-2497: fix a bug that was introduced in LUCENE-2480
> >
> > Modified:
> >
> > lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SegmentInfo.j
> > ava
> >
> > Modified:
> > lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SegmentInfo.j
> > ava
> > URL:
> > http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apach
> > e/lucene/index/SegmentInfo.java?rev=953986&r1=953985&r2=953986&view
> > =diff
> > ==========================================================
> > ====================
> > ---
> > lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SegmentInfo.j
> > ava (original)
> > +++
> > lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SegmentInfo.j
> > ava Sat Jun 12 10:47:35 2010
> > @@ -154,7 +154,8 @@ public final class SegmentInfo {
> >      }
> >      if (format > SegmentInfos.FORMAT_4_0) {
> >        // pre-4.0 indexes write a byte if there is a single norms file
> > -      assert 1 == input.readByte();
> > +      byte b = input.readByte();
> > +      assert 1 == b;
> >      }
> >      int numNormGen = input.readInt();
> >      if (numNormGen == NO) {
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Mime
View raw message