io.codemodder.codemods.OverridesMatchParentSynchronizationCodemod.description.md Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core-codemods Show documentation
Show all versions of core-codemods Show documentation
Codemods for fixing common errors across many Java projects
This change adds missing synchronized keyword to methods that override a synchronized method in the parent class.
Our changes look something like this:
```diff
interface AcmeParent {
synchronized void doThing();
}
class AcmeChild implements AcmeParent {
@Override
- void doThing() {
+ synchronized void doThing() {
thing();
}
}
```