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

Reply via email to