eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Compiler not flagging a throws statement as an error when exception is not possible
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 49
Description
Eclipse version:2023-9
Repeat the steps:
1. select “originalMethod()”
2. click “Refactor-inline method”
class OriginalClass {
public void originalMethod() throws IOException {
// Some logic here
}
}
class OtherClass {
public void callerMethod(){
OriginalClass obj = new OriginalClass();
try {
obj.originalMethod();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Refefctoring result;

Expected behavior: Check for syntax errors before inline method refactoring, and provide a prompt if any exist
Contributor guide
Assessment
This issue has not been assessed yet.