apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.58k stars 1.01k forks source link

SearchBean build broken [LUCENE-76] #1154

Closed asfimport closed 18 years ago

asfimport commented 21 years ago

From the jakarta-lucene-sandbox in the contributions/searchbean area:

compile: [javac] Compiling 3 source files to /Users/erik/dev/jakarta/jakarta-lucene-sandbox/contributions/searchbean/bin/classes [javac] /Users/erik/dev/jakarta/jakarta-lucene-sandbox/contributions/searchbean/src/java/org/apache/lucene/beans/IteratorAdapter.java:28: unreported exception java.io.IOException; must be caught or declared to be thrown [javac] return hitsIterator.next(); [javac] ^ [javac] 1 error

BUILD FAILED


Migrated from LUCENE-76 by Erik Hatcher (@erikhatcher), resolved May 27 2006 Environment:

Operating System: other
Platform: Other
asfimport commented 21 years ago

Otis Gospodnetic (migrated from JIRA)

And if one declares 'throws IOException' for next() method in IteratorAdapter, the compile-time error is:

compile: [javac] Compiling 1 source file to /mnt/disk2/cvs-repositories/jakarta/jakarta-lucene-sandbox/contributions/searchbean/bin/classes [javac] /mnt/disk2/cvs-repositories/jakarta/jakarta-lucene-sandbox/contributions/searchbean/src/java/org/apache/lucene/beans/IteratorAdapter.java:27: next() in org.apache.lucene.beans.IteratorAdapter cannot implement next() in java.util.Iterator; overridden method does not throw java.io.IOException [javac] public Object next() [javac] ^ [javac] 1 error

BUILD FAILED

From CVS log:

Although HitsIterator doesn't implement Iterator, it follows the Iterator idiom so this is just a simple adapter (really more of a wrapper) which does implement Iterator.

Hmm, did this ever compile? Did you ever get this to compile, Erik?

asfimport commented 21 years ago

Erik Hatcher (@erikhatcher) (migrated from JIRA)

Yes, I got it to compile locally by tweaking things until it worked. My use case was merely to learn what SearchBean could do - so I never committed my changes back. I did just commit them though, along with a fix to the build file.