diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2021-09-13 01:02:26 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2021-09-29 17:13:05 +0200 |
commit | 81771d86258891ca384b046f70b9d331fe9ab4a6 (patch) | |
tree | 1664575e67546c2eb575d778b662ae172f09907a | |
parent | 9683bc71b6c05ce1ca2b5d6c6f7d74fff3db8429 (diff) | |
download | jgit-81771d86258891ca384b046f70b9d331fe9ab4a6.tar.gz jgit-81771d86258891ca384b046f70b9d331fe9ab4a6.zip |
IndexDiffWithSymlinkTest: handle InaccessibleObjectException
On Java 16 this test throws InaccessibleObjectException, handle and
ignore it similar to IllegalAccessException.
Change-Id: I19b4f577579694a146516861a7ec567141f3464b
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/indexdiff/IndexDiffWithSymlinkTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/indexdiff/IndexDiffWithSymlinkTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/indexdiff/IndexDiffWithSymlinkTest.java index 7e513d2c39..d02bfcd3f6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/indexdiff/IndexDiffWithSymlinkTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/indexdiff/IndexDiffWithSymlinkTest.java @@ -59,6 +59,7 @@ import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Writer; +import java.lang.reflect.InaccessibleObjectException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.nio.file.Files; @@ -227,7 +228,8 @@ public class IndexDiffWithSymlinkTest extends LocalDiskRepositoryTestCase { return (byte[]) method.invoke(p); } } catch (NoSuchMethodException | IllegalAccessException - | IllegalArgumentException | InvocationTargetException e) { + | IllegalArgumentException | InvocationTargetException + | InaccessibleObjectException e) { // Ignore and fall through. } return null; |