diff options
author | Alex Light <allight@google.com> | 2016-04-05 17:49:22 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-04-05 17:49:22 +0000 |
commit | 31b66aa845d7294846e549da54750e4d8fd24822 (patch) | |
tree | 76a5becd9de1defb0e53cd4e689f0281e6bf544e /runtime/class_linker.cc | |
parent | 9a14710112d61e90412e54c3da83fc3f7849df8e (diff) | |
parent | d7c10c237bf2631630fac7982c3f374b1a27ed01 (diff) | |
download | android_art-31b66aa845d7294846e549da54750e4d8fd24822.tar.gz android_art-31b66aa845d7294846e549da54750e4d8fd24822.tar.bz2 android_art-31b66aa845d7294846e549da54750e4d8fd24822.zip |
Merge "Fix issued with non-public interface methods."
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 d73f205b80..18def2df2e 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -5876,9 +5876,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 |