Package org.sonar.java.checks
Class AbstractHashAlgorithmChecker
- java.lang.Object
-
- org.sonar.java.ast.visitors.SubscriptionVisitor
-
- org.sonar.plugins.java.api.IssuableSubscriptionVisitor
-
- org.sonar.java.checks.methods.AbstractMethodDetection
-
- org.sonar.java.checks.AbstractHashAlgorithmChecker
-
- All Implemented Interfaces:
JavaCheck,JavaFileScanner
- Direct Known Subclasses:
DataHashingCheck,DeprecatedHashAlgorithmCheck
public abstract class AbstractHashAlgorithmChecker extends AbstractMethodDetection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractHashAlgorithmChecker.DeprecatedSpringPasswordEncoderstatic classAbstractHashAlgorithmChecker.InsecureAlgorithm
-
Field Summary
Fields Modifier and Type Field Description protected static Map<String,AbstractHashAlgorithmChecker.InsecureAlgorithm>ALGORITHM_BY_METHOD_NAMEstatic StringGET_INSTANCEstatic StringJAVA_LANG_STRING-
Fields inherited from class org.sonar.java.ast.visitors.SubscriptionVisitor
context
-
-
Constructor Summary
Constructors Constructor Description AbstractHashAlgorithmChecker()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringgetMessageForAlgorithm(String algorithmName)protected abstract Optional<String>getMessageForClass(String className)protected MethodMatchersgetMethodInvocationMatchers()protected voidonConstructorFound(NewClassTree newClassTree)protected voidonMethodInvocationFound(MethodInvocationTree mit)-
Methods inherited from class org.sonar.java.checks.methods.AbstractMethodDetection
nodesToVisit, onMethodReferenceFound, visitNode
-
Methods inherited from class org.sonar.plugins.java.api.IssuableSubscriptionVisitor
addIssue, addIssueOnFile, reportIssue, reportIssue, reportIssue, scanTree
-
Methods inherited from class org.sonar.java.ast.visitors.SubscriptionVisitor
leaveFile, leaveNode, scanFile, setContext, visitToken, visitTrivia
-
-
-
-
Field Detail
-
GET_INSTANCE
public static final String GET_INSTANCE
- See Also:
- Constant Field Values
-
JAVA_LANG_STRING
public static final String JAVA_LANG_STRING
- See Also:
- Constant Field Values
-
ALGORITHM_BY_METHOD_NAME
protected static final Map<String,AbstractHashAlgorithmChecker.InsecureAlgorithm> ALGORITHM_BY_METHOD_NAME
-
-
Method Detail
-
getMethodInvocationMatchers
protected MethodMatchers getMethodInvocationMatchers()
- Specified by:
getMethodInvocationMatchersin classAbstractMethodDetection
-
onMethodInvocationFound
protected void onMethodInvocationFound(MethodInvocationTree mit)
- Overrides:
onMethodInvocationFoundin classAbstractMethodDetection
-
onConstructorFound
protected void onConstructorFound(NewClassTree newClassTree)
- Overrides:
onConstructorFoundin classAbstractMethodDetection
-
-