LUCENE-2103: NoLockFactory should have a private constructor

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@887995 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2009-12-07 16:49:21 +00:00
parent 0834cd4e4e
commit 1948e735e9
2 changed files with 12 additions and 0 deletions

View File

@ -20,6 +20,10 @@ API Changes
custom Similarity can alter how norms are encoded, though they must
still be encoded as a single byte (Johan Kindgren via Mike
McCandless)
* LUCENE-2103: NoLockFactory should have a private constructor;
until Lucene 4.0 the default one will be deprecated.
(Shai Erera via Uwe Schindler)
Bug fixes

View File

@ -32,6 +32,14 @@ public class NoLockFactory extends LockFactory {
// Single instance returned whenever makeLock is called.
private static NoLock singletonLock = new NoLock();
private static NoLockFactory singleton = new NoLockFactory();
/**
* @deprecated This constructor was not intended to be public and should not be used.
* It will be made private in Lucene 4.0
* @see #getNoLockFactory()
*/
// make private in 4.0!
public NoLockFactory() {}
public static NoLockFactory getNoLockFactory() {
return singleton;