lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: svn commit: r164695 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/search/Hit.java src/java/org/apache/lucene/search/HitIterator.java src/java/org/apache/lucene/search/Hits.java src/test/org/apache/lucene/TestHitIterator.java
Date Tue, 26 Apr 2005 19:09:05 GMT
On Apr 26, 2005, at 2:38 PM, Daniel Naber wrote:
> On Tuesday 26 April 2005 02:21, ehatcher@apache.org wrote:
>
>> +  public String toString() {
>> +    try {
>> +      return getDocument().toString();
>> +    } catch (IOException e) {
>> +      return null;
>> +    }
>> +  }
>
> Wouldn't it be better here to re-throw the exception as a 
> RuntimeException?

I don't know.... would it?  I have no preference, though it seems ok to 
me to simply return null since this is the toString method.  For a 
Document, the toString is only useful for debugging anyway.

	Erik


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


Mime
View raw message