mima icon indicating copy to clipboard operation
mima copied to clipboard

Signature checks fails on changes to 'throws' clause

Open raboof opened this issue 6 years ago • 1 comments

The signature check introduced in #299 was added to catch problems like https://github.com/lightbend/mima/tree/master/functional-tests/src/test/tuple-parametric-type-change , where a change in generics would allow a program without explicit casts to throw a ClassCastException at run time.

It also has the effect that warnings are introduced when the throws clause of a method changes. That might be less likely to be a problem in practice, perhaps we shouldn't warn about those by default?

raboof avatar Jul 11 '19 13:07 raboof

Changes to checked exceptions should never be a binary compatibility problem. While it is not source compatible for Java callers, it is not a semantic incompatibility, either. The JVM does not care about checked exceptions. Declaring a new checked exception is meaningless by itself. Actually throwing it has the same result as throwing a new unchecked exception.

szeiger avatar Jul 11 '19 13:07 szeiger