[EMAIL PROTECTED] wrote: [ ... ] > + private static final boolean DISABLE_LOCKS = Boolean.getBoolean("disableLocks"); [ ... ] > public boolean obtain() throws IOException { > - if (Constants.JAVA_1_1) return true; // locks disabled in jdk 1.1 > + if (Constants.JAVA_1_1) > + return true; // locks disabled in jdk 1.1 > + if (DISABLE_LOCKS) > + return true; > return lockFile.createNewFile(); > }
It would be simpler to just define DISABLE_LOCKS as: private static final boolean DISABLE_LOCKS Boolean.getBoolean("disableLocks") || Constants.JAVA_1_1; Then obtain() and release() can just have one check, of the form: if (DISABLE_LOCKS) ... Also, documentation of the "disableLocks" property should be added to FSDirectory's javadoc. We don't want undocumented features! Doug -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>