You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by us...@apache.org on 2009/09/10 09:06:50 UTC

svn commit: r813267 - /lucene/java/trunk/src/java/org/apache/lucene/store/FSLockFactory.java

Author: uschindler
Date: Thu Sep 10 07:06:50 2009
New Revision: 813267

URL: http://svn.apache.org/viewvc?rev=813267&view=rev
Log:
LUCENE-1877: make FSLockFactory.setLockDir() final to prevent users from doing bad things. This method was package private before, so no bw-problem, but as it is protected now (because an user's customized FSLockFactory must be able to call it from ctor), it must be final (contract: all methods called from ctors should be private or final). 

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/store/FSLockFactory.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/store/FSLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/store/FSLockFactory.java?rev=813267&r1=813266&r2=813267&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/store/FSLockFactory.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/store/FSLockFactory.java Thu Sep 10 07:06:50 2009
@@ -37,7 +37,7 @@
    * Subclasses can also use this method to set the directory
    * in the constructor.
    */
-  protected void setLockDir(File lockDir) {
+  protected final void setLockDir(File lockDir) {
     if (this.lockDir != null)
       throw new IllegalStateException("You can set the lock directory for this factory only once.");
     this.lockDir = lockDir;