@ThreadSafe public class FalsePositiveAnalyzer extends AbstractAnalyzer
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
CORE_FILES
Regex to identify core java library files.
|
static java.util.regex.Pattern |
CORE_JAVA
Regex to identify core java libraries and a few other commonly
misidentified ones.
|
static java.util.regex.Pattern |
CORE_JAVA_JSF
Regex to identify core jsf libraries.
|
static java.util.regex.Pattern |
CORE_JSF_FILES
Regex to identify core jsf java library files.
|
Constructor and Description |
---|
FalsePositiveAnalyzer() |
Modifier and Type | Method and Description |
---|---|
protected void |
analyzeDependency(Dependency dependency,
Engine engine)
Analyzes the dependencies and removes bad/incorrect CPE associations
based on various heuristics.
|
AnalysisPhase |
getAnalysisPhase()
Returns the phase that the analyzer is intended to run in.
|
protected java.lang.String |
getAnalyzerEnabledSettingKey()
Returns the setting key to determine if the analyzer is enabled.
|
java.lang.String |
getName()
Returns the name of the analyzer.
|
protected void |
removeBadMatches(Dependency dependency)
Removes bad CPE matches for a dependency.
|
analyze, close, closeAnalyzer, getSettings, initialize, isEnabled, prepare, prepareAnalyzer, setEnabled, supportsParallelProcessing
public static final java.util.regex.Pattern CORE_JAVA
public static final java.util.regex.Pattern CORE_JAVA_JSF
public static final java.util.regex.Pattern CORE_FILES
public static final java.util.regex.Pattern CORE_JSF_FILES
public java.lang.String getName()
public AnalysisPhase getAnalysisPhase()
protected java.lang.String getAnalyzerEnabledSettingKey()
Returns the setting key to determine if the analyzer is enabled.
getAnalyzerEnabledSettingKey
in class AbstractAnalyzer
protected void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException
analyzeDependency
in class AbstractAnalyzer
dependency
- the dependency to analyze.engine
- the engine that is scanning the dependenciesAnalysisException
- is thrown if there is an error reading the JAR
file.protected void removeBadMatches(Dependency dependency)
dependency
- the dependency to analyzeCopyright© 2012-21 Jeremy Long. All Rights Reserved.