lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27638] - Compile error CVS head (3/12/04 - 2:55pm ET)
Date Mon, 15 Mar 2004 18:34:23 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27638>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27638

Compile error CVS head (3/12/04 - 2:55pm ET)





------- Additional Comments From cutting@apache.org  2004-03-15 18:34 -------
Sigh.  This looks like a compiler incompatibility between 1.3 and 1.4, where 1.4
fixed a bug in the 1.3 compiler.  If you compile in 1.4, things should run fine
in 1.3.  Our primary goal should be to make sure that the compiled code runs in
earlier releases.  But it would also be best if it compiles in these releases too...

In this case, I can't see a way around this without changing the anonymous class
into a named inner class whose constructor throws IOException.  For example:

  public Spans getSpans(final IndexReader reader) throws IOException {
    return new FirstSpans(reader);
  }
  private class FirstSpans implements Spans {
    private Spans spans;
    public FirstSpans(IndexReader reader) throws IOException {
      this.spans = match.getSpans(reader);
    }
    ... the rest of the methods ... 
  }

Does this work correctly in 1.3?  Does that look like the best fix to others?

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message