Skip to content

Commit c81be00

Browse files
Nicolas GeoffrayYqwed
authored andcommitted
Handle another case of exceptions of type 'Error' when accessing members through JNI.
This got missed in https://googleplex-android-review.googlesource.com/c/platform/cts/+/16564904 This is cherry-pick of ag/16602503. Test: CtsHiddenApiKillswitchDebugClassTestCases Test: run cts --module CtsHiddenApiKillswitchDebugClassTestCases Test: run cts --module CtsHiddenApiKillswitchSdkListTestCases Test: run cts --module CtsHiddenApiKillswitchWildcardTestCases Bug: 213899896 Bug: 286785698 Change-Id: I56ef8d1cc5480814b5514d961d1a86f8d452276f Merged-In: I56ef8d1cc5480814b5514d961d1a86f8d452276f
1 parent 24d774b commit c81be00

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

tests/signature/lib/android/src/android/signature/cts/DexMemberChecker.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ public static void checkSingleMember(DexMember dexMember, boolean reflection, bo
9898
try {
9999
observer.fieldAccessibleViaJni(hasMatchingField_JNI(klass, field), field);
100100
} catch (ClassNotFoundException | Error e) {
101-
if ((e instanceof NoClassDefFoundError)
102-
&& !(e.getCause() instanceof ExceptionInInitializerError)
103-
&& !(e.getCause() instanceof UnsatisfiedLinkError)) {
101+
if ((e instanceof NoClassDefFoundError) && !(e.getCause() instanceof Error)) {
104102
throw (NoClassDefFoundError) e;
105103
}
106104

0 commit comments

Comments
 (0)