spotify / missinglink

Build time tool for detecting link problems in java projects
Apache License 2.0
146 stars 27 forks source link

classes that implement an interface but are missing required methods are not caught by missinglink #22

Open mattnworb opened 9 years ago

mattnworb commented 9 years ago

Inspired by another real-world case of shooting myself in the foot:

If a project using A and B is updated to use the new version of A, but the version of B in pom.xml is not changed, then an AbstractMethodError is thrown at runtime if Metrics.newMethod() is called on a reference to FooMetrics.

I don't think missinglink:0.1.0 is capable of catching this because the bytecode would contain method call instructions that point to Metrics and not FooMetrics. missinglink would not know that there exists an implementation of Metrics on the classpath (and that it is used) that does not implement that new method.

Not sure if it will be feasible for missinglink to detect this but wanted to write it down while the details are fresh.

pettermahlen commented 9 years ago

I think one of the system tests is designed to provoke this error.