]> source.dussan.org Git - jgit.git/commitdiff
Workaround SecurityException in FS#getFsTimestampResolution 36/145436/12
authorMatthias Sohn <matthias.sohn@sap.com>
Wed, 3 Jul 2019 21:00:14 +0000 (23:00 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 17 Jul 2019 07:42:15 +0000 (09:42 +0200)
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>
org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java

index a970a7df23adfae9800641431fc01edcb1f727ec..6e3e336e94264c1b4b22ed381bfe2d04cba8a038 100644 (file)
@@ -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;