You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2016/04/30 22:17:40 UTC
lucene-solr:branch_6x: Improve exception message so you see
expected/actual if lock file is messed with
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x ad152d23d -> 6c0e940b9
Improve exception message so you see expected/actual if lock file is messed with
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6c0e940b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6c0e940b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6c0e940b
Branch: refs/heads/branch_6x
Commit: 6c0e940b9b65194561362dd7dfb098d0ae84ff25
Parents: ad152d2
Author: Robert Muir <rm...@apache.org>
Authored: Sat Apr 30 16:16:24 2016 -0400
Committer: Robert Muir <rm...@apache.org>
Committed: Sat Apr 30 16:17:32 2016 -0400
----------------------------------------------------------------------
.../src/java/org/apache/lucene/store/NativeFSLockFactory.java | 4 ++--
.../src/java/org/apache/lucene/store/SimpleFSLockFactory.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c0e940b/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java b/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java
index 7027014..4f17d95 100644
--- a/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java
@@ -176,7 +176,7 @@ public final class NativeFSLockFactory extends FSLockFactory {
// if it differs, someone deleted our lock file (and we are ineffective)
FileTime ctime = Files.readAttributes(path, BasicFileAttributes.class).creationTime();
if (!creationTime.equals(ctime)) {
- throw new AlreadyClosedException("Underlying file changed by an external force at " + creationTime + ", (lock=" + this + ")");
+ throw new AlreadyClosedException("Underlying file changed by an external force at " + ctime + ", (lock=" + this + ")");
}
}
@@ -199,7 +199,7 @@ public final class NativeFSLockFactory extends FSLockFactory {
@Override
public String toString() {
- return "NativeFSLock(path=" + path + ",impl=" + lock + ",ctime=" + creationTime + ")";
+ return "NativeFSLock(path=" + path + ",impl=" + lock + ",creationTime=" + creationTime + ")";
}
}
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c0e940b/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java b/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java
index f0b9683..101ff5e 100644
--- a/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java
@@ -111,7 +111,7 @@ public final class SimpleFSLockFactory extends FSLockFactory {
// if it differs, someone deleted our lock file (and we are ineffective)
FileTime ctime = Files.readAttributes(path, BasicFileAttributes.class).creationTime();
if (!creationTime.equals(ctime)) {
- throw new AlreadyClosedException("Underlying file changed by an external force at " + creationTime + ", (lock=" + this + ")");
+ throw new AlreadyClosedException("Underlying file changed by an external force at " + ctime + ", (lock=" + this + ")");
}
}
@@ -144,7 +144,7 @@ public final class SimpleFSLockFactory extends FSLockFactory {
@Override
public String toString() {
- return "SimpleFSLock(path=" + path + ",ctime=" + creationTime + ")";
+ return "SimpleFSLock(path=" + path + ",creationTime=" + creationTime + ")";
}
}
}