lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r813267 - /lucene/java/trunk/src/java/org/apache/lucene/store/FSLockFactory.java
Date Thu, 10 Sep 2009 07:06:50 GMT
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;



Mime
View raw message