IndexDiffWithSymlinkTest: handle InaccessibleObjectException
On Java 16 this test throws InaccessibleObjectException, handle and ignore it similar to IllegalAccessException. Change-Id: I19b4f577579694a146516861a7ec567141f3464b
This commit is contained in:
parent
9683bc71b6
commit
81771d8625
|
@ -59,6 +59,7 @@
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.OutputStreamWriter;
|
import java.io.OutputStreamWriter;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
|
import java.lang.reflect.InaccessibleObjectException;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
@ -227,7 +228,8 @@ private byte[] rawPath(Path p) {
|
||||||
return (byte[]) method.invoke(p);
|
return (byte[]) method.invoke(p);
|
||||||
}
|
}
|
||||||
} catch (NoSuchMethodException | IllegalAccessException
|
} catch (NoSuchMethodException | IllegalAccessException
|
||||||
| IllegalArgumentException | InvocationTargetException e) {
|
| IllegalArgumentException | InvocationTargetException
|
||||||
|
| InaccessibleObjectException e) {
|
||||||
// Ignore and fall through.
|
// Ignore and fall through.
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue