From 4db39f50742706091ee66207526cc801db40b780 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 3 Jul 2019 23:00:14 +0200 Subject: [PATCH] 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 --- org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a970a7df23..6e3e336e94 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 @@ public abstract class FS { } catch (IOException | InterruptedException | ExecutionException e) { LOG.error(e.getMessage(), e); - } catch (TimeoutException e) { + } catch (TimeoutException | SecurityException e) { // use fallback } return FALLBACK_TIMESTAMP_RESOLUTION; -- 2.39.5