lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: svn commit: r950300 - /lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/store/NativeFSLockFactory.java
Date Tue, 01 Jun 2010 23:14:28 GMT
Oh no, good catch! :-) Better than too late!

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: mikemccand@apache.org [mailto:mikemccand@apache.org]
> Sent: Wednesday, June 02, 2010 1:07 AM
> To: java-commits@lucene.apache.org
> Subject: svn commit: r950300 -
> /lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/store/Nativ
> eFSLockFactory.java
> 
> Author: mikemccand
> Date: Tue Jun  1 23:07:06 2010
> New Revision: 950300
> 
> URL: http://svn.apache.org/viewvc?rev=950300&view=rev
> Log:
> LUCENE-2421: don't use ManagementFactory (not available in 1.4)
> 
> Modified:
> 
> lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/store/Nativ
> eFSLockFactory.java
> 
> Modified:
> lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/store/Nativ
> eFSLockFactory.java
> URL:
> http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/java/o
> rg/apache/lucene/store/NativeFSLockFactory.java?rev=950300&r1=950299&
> r2=950300&view=diff
> ==========================================================
> ====================
> ---
> lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/store/Nativ
> eFSLockFactory.java (original)
> +++
> lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/store/Nativ
> eFSLockFactory.java Tue Jun  1 23:07:06 2010
> @@ -17,7 +17,6 @@ package org.apache.lucene.store;
>   * limitations under the License.
>   */
> 
> -import java.lang.management.ManagementFactory;
>  import java.nio.channels.FileChannel;
>  import java.nio.channels.FileLock;
>  import java.io.File;
> @@ -84,10 +83,7 @@ public class NativeFSLockFactory extends
>      // our tests). On most systems, the name includes the process Id.
>      // Also, remove any non-alphanumeric characters, so that the lock file will
>      // be created for sure on all systems.
> -    String randomLockName = "lucene-"
> -        +
> ManagementFactory.getRuntimeMXBean().getName().replaceAll("[^a..zA..Z
> 0..9]+","") + "-"
> -        + Long.toString(new Random().nextInt(), Character.MAX_RADIX)
> -        + "-test.lock";
> +    String randomLockName = "lucene-" + Long.toString(new
> Random().nextInt(), Character.MAX_RADIX) + "-test.lock";
> 
>      Lock l = makeLock(randomLockName);
>      try {
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message