Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signature checks fails on changes to 'throws' clause #335

Open
raboof opened this issue Jul 11, 2019 · 1 comment
Open

Signature checks fails on changes to 'throws' clause #335

raboof opened this issue Jul 11, 2019 · 1 comment

Comments

@raboof
Copy link
Contributor

raboof commented Jul 11, 2019

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?

@szeiger
Copy link
Contributor

szeiger commented Jul 11, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants