eclipse-jdt / eclipse-jdt/eclipse.jdt.core
[4.35+][Experimental] Could modelling SynchronizedStatement as a subclass of TryStatement lead to simpler code/nomenclature?
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
While working on the PR https://github.com/eclipse-jdt/eclipse.jdt.core/pull/3242 for https://github.com/eclipse-jdt/eclipse.jdt.core/issues/3240 - I get the sense that modelling `org.eclipse.jdt.internal.compiler.ast.SynchronizedStatement` as a subclass of `org.eclipse.jdt.internal.compiler.ast.TryStatement` could lead to much simpler nomenclature and readable code (for flow analysis phase)
A synchronized statement such as:
```
synchronized(expression) {
// block body
}
```
should be modellable as:
```
try {
// obtain monitor
{
// block body
}
} catch (Throwable any) {
throw any;
} finally {
// release monitor
}
```
Contributor guide
Assessment
This issue has not been assessed yet.