You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: Thijs J. <ito...@th...> - 2004-04-20 10:20:37
|
Dear all,
Erik and I discoverd a bug in the FilterIterator. It wasn't possible to
iterate over a collection wit null elements. We've added a test to
FilterIteratorTest to demonstrate the problem:
public void testIteratorWithNullValues(){
Collection coll = Arrays.asList(new Object[]{null,null,null,"bla"});
Iterator it = new FilterIterator(coll.iterator(), new AlwaysTruePredicate());
assertTrue(it.hasNext());
assertNull(it.next());
assertNull(it.next());
assertNull(it.next());
assertEquals("bla",it.next());
assertFalse(it.hasNext());
}
We solved the problem in the class IteratorAsStack which couldn't handle null
elements. We added a new attribute topElementSet and changed the method
isEmpty() and pop();
public class IteratorAsStack implements Stack {
private Iterator delegate;
private Object topElement;
private boolean topElementSet=false;
public IteratorAsStack(Iterator iterator) {
this.delegate = iterator;
}
public Object peek() {
if (isEmpty())
throw new NoSuchElementException();
return topElement;
}
public Object pop() {
Object result = peek();
topElementSet = false;
return result;
}
public void push(Object object) {
throw new UnsupportedOperationException();
}
public boolean isEmpty() {
if (!topElementSet && delegate.hasNext()) {
topElement = delegate.next();
topElementSet = true;
}
return !topElementSet;
}
}
The changes are committed to the cq2-itor branch.
Best regards,
Thijs
--
Thijs Janssen
th...@cq...
ito...@th...
Seek You Too B.V.
http://www.cq2.nl
|
|
From: Thijs J. <ito...@th...> - 2004-03-18 08:49:59
|
Hi, I've changed the org.mortbay.jetty.SOURCE.tar.gz file into a zip file so that it can be used in eclipse to view the source of Jetty classes. (Eclipse didn't understand the tar.gz format.) Thijs -- Thijs Janssen th...@cq... ito...@th... Seek You Too B.V. http://www.cq2.nl |
|
From: <it...@wi...> - 2004-03-05 16:24:13
|
Hi, I'm on the lucene devlopers mailing list now, and found this: http://home.clara.net/markharwood/lucene/highlight.htm pluggable kwic highlighting (also usable outside a lucene context). I'm going to do a spike, to see if it also works with fuzzy/approximate queries (searching "itog" also returns "itor" "ator" etc). cheers, -- Willem van den Ende - http://www.cq2.nl |