Can you open an issue, I will take it then. I will not commit any API change without issue for the next time *g*
Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de _____ From: Shai Erera [mailto:ser...@gmail.com] Sent: Wednesday, December 02, 2009 2:54 PM To: java-dev@lucene.apache.org Subject: Re: NoLockFactory does not have a private ctor ok so will you mark it deprecated that way? On Wed, Dec 2, 2009 at 3:46 PM, Uwe Schindler <u...@thetaphi.de> wrote: Hi Shai, It exists, auto-generated by the compiler! But for deprecating and javadocs, we have to explicitly create one. This is not a huge deal. And for everybody it is clear (the @deprec message should tell, that this class should be a singleton), that it will not be removed in 4.0, but instead made private. This was a lapsus in the initial implementation (I have seen lots of these faults, e.g. in commons.lang project, where all static utility classes contain the default ctor, but the whole class is for static use only *g*). Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de _____ From: Shai Erera [mailto:ser...@gmail.com] Sent: Wednesday, December 02, 2009 2:26 PM To: java-dev@lucene.apache.org Subject: Re: NoLockFactory does not have a private ctor So you believe someone actually does "new NoLockFactory()"? If so, we should add the ctor as deprecated, because currently it does not exist, and thus cannot be deprecated :). Of course, adding a deprecated empty ctor needs to be accompanied by proper documentation to move it to private, or else it will be deleted, and we'll have this thread again after 4.0 :). Shai On Wed, Dec 2, 2009 at 2:57 PM, Uwe Schindler <u...@thetaphi.de> wrote: I have seen this several times when working on oal.store. We should have deprecated the ctor in 2.9 and removed in 3.0. For BW compatibility we have to simply deprecate it and tell the user to take the singleton. Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de _____ From: Shai Erera [mailto:ser...@gmail.com] Sent: Wednesday, December 02, 2009 1:11 PM To: java-dev@lucene.apache.org Subject: NoLockFactory does not have a private ctor NoLockFactory documents in its javadocs that one should call the static getNoLockFactory() in order to create an instance. The class however does not have a private ctor, so someone can create another instance of it. This is not a big deal though, because makeLock returns a static member. But it looks like this class should follow the singleton pattern, however doesn't. Looks an easy fix to me. Can someone commit it, or do we need an issue? Shai