Package io.codemodder.codemods
Class OverridesMatchParentSynchronizationCodemod
java.lang.Object
io.codemodder.javaparser.JavaParserChanger
io.codemodder.providers.sonar.SonarPluginJavaParserChanger<com.github.javaparser.ast.expr.SimpleName>
io.codemodder.codemods.OverridesMatchParentSynchronizationCodemod
- All Implemented Interfaces:
io.codemodder.CodeChanger
@Codemod(id="sonar:java/overrides-match-synchronization-s3551",
reviewGuidance=MERGE_AFTER_CURSORY_REVIEW,
importance=MEDIUM,
executionPriority=HIGH)
public final class OverridesMatchParentSynchronizationCodemod
extends io.codemodder.providers.sonar.SonarPluginJavaParserChanger<com.github.javaparser.ast.expr.SimpleName>
A codemod for automatically fixing overridden methods that do not match their parent methods in
synchronization.
-
Field Summary
Fields inherited from class io.codemodder.javaparser.JavaParserChanger
reporter
-
Constructor Summary
ConstructorsConstructorDescriptionOverridesMatchParentSynchronizationCodemod
(io.codemodder.providers.sonar.RuleIssues issues) -
Method Summary
Modifier and TypeMethodDescriptionboolean
onIssueFound
(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, com.github.javaparser.ast.expr.SimpleName methodName, io.codemodder.providers.sonar.api.Issue issue) Methods inherited from class io.codemodder.providers.sonar.SonarPluginJavaParserChanger
shouldRun, visit
Methods inherited from class io.codemodder.javaparser.JavaParserChanger
dependenciesRequired, getDescription, getIndividualChangeDescription, getReferences, getSummary
-
Constructor Details
-
OverridesMatchParentSynchronizationCodemod
@Inject public OverridesMatchParentSynchronizationCodemod(@ProvidedSonarScan(ruleId="java:S3551") io.codemodder.providers.sonar.RuleIssues issues)
-
-
Method Details
-
onIssueFound
public boolean onIssueFound(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, com.github.javaparser.ast.expr.SimpleName methodName, io.codemodder.providers.sonar.api.Issue issue) - Specified by:
onIssueFound
in classio.codemodder.providers.sonar.SonarPluginJavaParserChanger<com.github.javaparser.ast.expr.SimpleName>
-