Refine the check for overriding interface methods.

One interface method overrides another only if the overrider is in a subinterface of the overridden. This is the first bullet in [JLS §9.4.1.1](https://docs.oracle.com/javase/specs/jls/se17/html/jls-9.html#jls-9.4.1.1).

Remove a test that was checking for the old behaviour. It was intended to fix a bug in Dagger, but Dagger now works fine without this fix, and has its own test for the relevant situation.

RELNOTES=In `MoreElements.overrides` and `.getLocalAndInheritedMethods`, an interface method is no longer considered to override another interface method unless the first interface inherits from the second. This means that `.getLocalAndInheritedMethods` may now return two methods with the same signature where before it only returned one.
PiperOrigin-RevId: 403430316
3 files changed
tree: 820f490eec48e4d80126303583505eb4e4a750be
  1. .github/
  2. common/
  3. factory/
  4. service/
  5. util/
  6. value/
  7. .gitignore
  8. build-pom.xml
  9. CONTRIBUTING.md
  10. LICENSE
  11. README.md
README.md

Auto

Build Status

A collection of source code generators for Java.

Auto‽

Java is full of code that is mechanical, repetitive, typically untested and sometimes the source of subtle bugs. Sounds like a job for robots!

The Auto subprojects are a collection of code generators that automate those types of tasks. They create the code you would have written, but without the bugs.

Save time. Save code. Save sanity.

Subprojects

License

Copyright 2013 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.