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

Removal of checked exception from method signature is not detected #263

Closed
Snipx opened this issue Jun 9, 2020 · 1 comment
Closed

Removal of checked exception from method signature is not detected #263

Snipx opened this issue Jun 9, 2020 · 1 comment

Comments

@Snipx
Copy link

Snipx commented Jun 9, 2020

There is currently METHOD_NOW_THROWS_CHECKED_EXCEPTION inspection for addition of checked exceptions into method signature.
However, there does not seem to be an inspection for checked exception removal from method signature.
Imagine the following case:

    public void throwingMethod() throws IOException {

    }

    public void clientMethod() {
        try {
            throwingMethod();
        } catch (IOException exc) {
        }
    }

If throws IOException is removed, clientMethod will not compile anymore, so it's definitely at least source compatibility violation. I am not sure about binary compatibility here.

I might be missing something, but I expect such change to be detected as a breaking change by the plugin and it's currently not detected to the best of my understanding.
Thanks in advance

@siom79
Copy link
Owner

siom79 commented Oct 17, 2020

Fixed with 0.14.4

@siom79 siom79 closed this as completed Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants