You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Daniel Naber <lu...@danielnaber.de> on 2007/02/03 17:39:33 UTC

deprecate Directory.renameFile()?

Hi,

I see that Directory.renameFile() isn't used anymore. I assume it has only 
been public for technical reasons, not because we expect this to be used 
from outside of Lucene? Should we deprecate this method? Its 
implementation e.g. in FSDirectory looks a bit scary anyway (the comment 
correctly says "This is not atomic" while the abstract class says "This 
replacement should be atomic").

Regards
 Daniel

-- 
http://www.danielnaber.de

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


Re: deprecate Directory.renameFile()?

Posted by Michael McCandless <lu...@mikemccandless.com>.
Daniel Naber wrote:

> I see that Directory.renameFile() isn't used anymore. I assume it has only 
> been public for technical reasons, not because we expect this to be used 
> from outside of Lucene? Should we deprecate this method? Its 
> implementation e.g. in FSDirectory looks a bit scary anyway (the comment 
> correctly says "This is not atomic" while the abstract class says "This 
> replacement should be atomic").

Oh, good catch!  I agree it should be deprecated.  In addition to
the non-atomic issue, that method is also problematic on Windows
(intermittent access denied errors, LUCENE-665).  Let's deprecate it
before 2.1?

Mike

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