Sandy McArthur wrote:
I don't think LineIterator should have a finalizer method and I
believe the JavaDocs in that class about resource leaks are wrong and
unnecessarily alarming.
Here is the problem as I see it.
Create a LineIterator.
Start using it.
An exception is thrown.
The LineIterator is not closed.
(assumes the user doesn't write the finally clause as the javadoc tells
them to)
This would appear to be a resource leak situation, as the underlying
reader, which the iterator wraps, is still open.
If you have a better solution, I'd love to hear it, as I don't like the
finalize method especially. (Feel free to commit to [io])
Stephen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]