aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-filelock/src/main
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-12-12 22:37:34 +0000
committerOlivier Lamy <olamy@apache.org>2013-12-12 22:37:34 +0000
commit79329d262e0df3eae6e1cb7d92bdb47a2cf5ab21 (patch)
treeafe6889c112438ec1eab539fa0f1e9eb348c3bf2 /archiva-modules/archiva-base/archiva-filelock/src/main
parent7fc6fb2158429c575bb8bd59c718c6c28694654e (diff)
downloadarchiva-79329d262e0df3eae6e1cb7d92bdb47a2cf5ab21.tar.gz
archiva-79329d262e0df3eae6e1cb7d92bdb47a2cf5ab21.zip
fix timeout
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550562 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-filelock/src/main')
-rw-r--r--archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
index e55a56ad2..08f01488a 100644
--- a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
+++ b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
@@ -19,10 +19,10 @@ package org.apache.archiva.common.filelock;
* under the License.
*/
+import org.apache.commons.lang.time.StopWatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
-import org.springframework.util.StopWatch;
import java.io.File;
import java.io.FileNotFoundException;
@@ -67,7 +67,8 @@ public class DefaultFileLockManager
{
if ( timeout > 0 )
{
- long delta = stopWatch.getTotalTimeMillis();
+ long delta = stopWatch.getTime();
+ log.debug( "delta {}, timeout {}", delta, timeout );
if ( delta > timeout )
{
log.warn( "Cannot acquire read lock within {} millis. Will skip the file: {}", timeout, file );
@@ -120,7 +121,8 @@ public class DefaultFileLockManager
{
if ( timeout > 0 )
{
- long delta = stopWatch.getTotalTimeMillis();
+ long delta = stopWatch.getTime();
+ log.debug( "delta {}, timeout {}", delta, timeout );
if ( delta > timeout )
{
log.warn( "Cannot acquire read lock within {} millis. Will skip the file: {}", timeout, file );