aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/internal
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2015-08-26 16:16:28 -0400
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2015-08-26 16:16:30 -0400
commitcc50ec2d87db5d0266aa5ffe6e541039f9157f67 (patch)
tree01fcf3f7bc614ebfd6c4d01e4812bcfedd240907 /org.eclipse.jgit/src/org/eclipse/jgit/internal
parentb5941c74e59e64c5fd374a09067e74e26eed2612 (diff)
parentcb08dd8b14bf4900c7974dd1ce5a3d553016585a (diff)
downloadjgit-cc50ec2d87db5d0266aa5ffe6e541039f9157f67.tar.gz
jgit-cc50ec2d87db5d0266aa5ffe6e541039f9157f67.zip
Merge "Add public isStaleFileHandle() API, improve detection."
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/internal')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
index 796109aee2..a430d1a6f1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
@@ -114,8 +114,6 @@ public class ObjectDirectory extends FileObjectDatabase {
/** Maximum number of candidates offered as resolutions of abbreviation. */
private static final int RESOLVE_ABBREV_LIMIT = 256;
- private static final String STALE_FILE_HANDLE_MSG = "stale file handle"; //$NON-NLS-1$
-
private final Config config;
private final File objects;
@@ -565,8 +563,7 @@ public class ObjectDirectory extends FileObjectDatabase {
} else if (e instanceof FileNotFoundException) {
warnTmpl = JGitText.get().packWasDeleted;
removePack(p);
- } else if (e.getMessage() != null
- && e.getMessage().toLowerCase().contains(STALE_FILE_HANDLE_MSG)) {
+ } else if (FileUtils.isStaleFileHandle(e)) {
warnTmpl = JGitText.get().packHandleIsStale;
removePack(p);
}