diff options
author | Alex Light <allight@google.com> | 2016-04-05 18:10:06 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-04-05 18:10:06 +0000 |
commit | d84e1acf1dee420b469bd2eafe1f8c48f4b8cc83 (patch) | |
tree | 30c261f9862fc88567ec7480cc5742a5ce864a30 /runtime/class_linker.cc | |
parent | 3fdb5d2e6b6cec28f137c0953b959011ac06f769 (diff) | |
parent | 6c3ce7a7aca25efb0cb2e9b5ea29b82a014e050e (diff) | |
download | android_art-d84e1acf1dee420b469bd2eafe1f8c48f4b8cc83.tar.gz android_art-d84e1acf1dee420b469bd2eafe1f8c48f4b8cc83.tar.bz2 android_art-d84e1acf1dee420b469bd2eafe1f8c48f4b8cc83.zip |
Merge "Fix issued with non-public interface methods." am: 31b66aa
am: 6c3ce7a
* commit '6c3ce7a7aca25efb0cb2e9b5ea29b82a014e050e':
Fix issued with non-public interface methods.
Change-Id: I27eaac567e296e4e940b2002725bf95a469edecf
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r-- | runtime/class_linker.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 335357e736..ae0c5d3999 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -5885,9 +5885,14 @@ ClassLinker::DefaultMethodSearchResult ClassLinker::FindDefaultMethodImplementat !target_name_comparator.HasSameNameAndSignature( current_method->GetInterfaceMethodIfProxy(image_pointer_size_))) { continue; + } else if (!current_method->IsPublic()) { + // The verifier should have caught the non-public method for dex version 37. Just warn and + // skip it since this is from before default-methods so we don't really need to care that it + // has code. + LOG(WARNING) << "Interface method " << PrettyMethod(current_method) << " is not public! " + << "This will be a fatal error in subsequent versions of android. " + << "Continuing anyway."; } - // The verifier should have caught the non-public method. - DCHECK(current_method->IsPublic()) << "Interface method is not public!"; if (UNLIKELY(chosen_iface.Get() != nullptr)) { // We have multiple default impls of the same method. This is a potential default conflict. // We need to check if this possibly conflicting method is either a superclass of the chosen |