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

InlineCodeRatherThanPeremptoryConditionRefactoring produces non compilable code #338

Open
cal101 opened this issue May 17, 2018 · 0 comments
Assignees
Labels

Comments

@cal101
Copy link
Collaborator

cal101 commented May 17, 2018

This diff makes the code not compilable because the catch has nothing to catch:

         try {
-            if (false) {
-                methodThatThrowsFileNotFoundException();
-            } else {
-                methodThatDoesNotThrowFileNotFoundException();
-            }
+           methodThatDoesNotThrowFileNotFoundException();
         } catch (FileNotFoundException e) {
             throw new IllegalFileException("can not write", e);
         }

I understand that fixing this requires exception flow analysis.
What is the state of control flow analysis in AutoRefactor?
Is there support for exception flow analysis?

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

No branches or pull requests

2 participants