Browse Source

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>
stable-5.1
Matthias Sohn 5 years ago
parent
commit
4db39f5074
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java

2
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;

Loading…
Cancel
Save