Woops, thanks Uwe! Mike McCandless
http://blog.mikemccandless.com On Sat, Aug 18, 2012 at 3:56 PM, <[email protected]> wrote: > Author: uschindler > Date: Sat Aug 18 19:56:33 2012 > New Revision: 1374647 > > URL: http://svn.apache.org/viewvc?rev=1374647&view=rev > Log: > Merged revision(s) 1374646 from lucene/dev/trunk: > 2nd fix: The same problem had size() > > Modified: > lucene/dev/branches/branch_4x/ (props changed) > lucene/dev/branches/branch_4x/lucene/ (props changed) > lucene/dev/branches/branch_4x/lucene/test-framework/ (props changed) > > lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java > > Modified: > lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java > URL: > http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java?rev=1374647&r1=1374646&r2=1374647&view=diff > ============================================================================== > --- > lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java > (original) > +++ > lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java > Sat Aug 18 19:56:33 2012 > @@ -64,11 +64,7 @@ public final class FieldFilterAtomicRead > f = new FieldFilterFields(f); > // we need to check for emptyness, so we can return > // null: > - if (f.iterator().hasNext()) { > - return f; > - } else { > - return null; > - } > + return f.iterator().hasNext() ? f : null; > } > > @Override > @@ -146,7 +142,8 @@ public final class FieldFilterAtomicRead > // TODO: add faster implementation! > int c = 0; > final Iterator<String> it = iterator(); > - while (it.next() != null) { > + while (it.hasNext()) { > + it.next(); > c++; > } > return c; > @@ -156,7 +153,7 @@ public final class FieldFilterAtomicRead > public Iterator<String> iterator() { > final Iterator<String> in = super.iterator(); > return new Iterator<String>() { > - String cached = null; > + private String cached = null; > > @Override > public String next() { > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
