I knew I would have overlooked something, thanks for the help!
On 12/11/2009, at 9:21 AM, Uwe Schindler wrote:
....simply do not catch and rethrow the IOException, instead put
release in a
finally block and let the IOException automatically go upwards.
this.retain();
try {
TopDocs result = searcher.search(query, limit);
return result;
} finally {
this.release();
}
Less code more secure and effective :-)
____________________________________
Information Technology Services,
The University of Melbourne
Email: jrho...@unimelb.edu.au
Phone: +61 3 8344 2884
Mobile: +61 4 1095 7575
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org