Workaround SecurityException in FS#getFsTimestampResolution
On Android FS#getFsTimestampResolution always throws a
SecurityException, handle this by falling back to the fallback timestamp
resolution.
Bug: 548947
Change-Id: I0ee6cb3c20e189bdc8d488434a930427ad6f2df2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
index a970a7d..6e3e336 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
@@ -281,7 +281,7 @@ private static Duration getFsTimestampResolution(Path file) {
} catch (IOException | InterruptedException
| ExecutionException e) {
LOG.error(e.getMessage(), e);
- } catch (TimeoutException e) {
+ } catch (TimeoutException | SecurityException e) {
// use fallback
}
return FALLBACK_TIMESTAMP_RESOLUTION;