mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-18 17:47:05 +01:00
minor updates - still no implementation though
Former-commit-id: 53b5a5ad98e02cf9b18b167205079c489c75a336
This commit is contained in:
@@ -48,6 +48,7 @@ public class JavaScriptAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of file EXTENSIONS supported by this analyzer.
|
* Returns a list of file EXTENSIONS supported by this analyzer.
|
||||||
|
*
|
||||||
* @return a list of file EXTENSIONS supported by this analyzer.
|
* @return a list of file EXTENSIONS supported by this analyzer.
|
||||||
*/
|
*/
|
||||||
public Set<String> getSupportedExtensions() {
|
public Set<String> getSupportedExtensions() {
|
||||||
@@ -56,6 +57,7 @@ public class JavaScriptAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the analyzer.
|
* Returns the name of the analyzer.
|
||||||
|
*
|
||||||
* @return the name of the analyzer.
|
* @return the name of the analyzer.
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
@@ -64,6 +66,7 @@ public class JavaScriptAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether or not this analyzer can process the given extension.
|
* Returns whether or not this analyzer can process the given extension.
|
||||||
|
*
|
||||||
* @param extension the file extension to test for support.
|
* @param extension the file extension to test for support.
|
||||||
* @return whether or not the specified file extension is supported by this
|
* @return whether or not the specified file extension is supported by this
|
||||||
* analyzer.
|
* analyzer.
|
||||||
@@ -74,6 +77,7 @@ public class JavaScriptAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the phase that the analyzer is intended to run in.
|
* Returns the phase that the analyzer is intended to run in.
|
||||||
|
*
|
||||||
* @return the phase that the analyzer is intended to run in.
|
* @return the phase that the analyzer is intended to run in.
|
||||||
*/
|
*/
|
||||||
public AnalysisPhase getAnalysisPhase() {
|
public AnalysisPhase getAnalysisPhase() {
|
||||||
@@ -81,11 +85,6 @@ public class JavaScriptAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
}
|
}
|
||||||
//</editor-fold>
|
//</editor-fold>
|
||||||
|
|
||||||
/**
|
|
||||||
* The system independent newline character.
|
|
||||||
*/
|
|
||||||
private static final String NEWLINE = System.getProperty("line.separator");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads a specified JAR file and collects information from the manifest and
|
* Loads a specified JAR file and collects information from the manifest and
|
||||||
* checksums to identify the correct CPE information.
|
* checksums to identify the correct CPE information.
|
||||||
@@ -100,32 +99,23 @@ public class JavaScriptAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds license information to the given dependency.
|
|
||||||
*
|
|
||||||
* @param d the dependency
|
|
||||||
* @param license the license
|
|
||||||
*/
|
|
||||||
private void addLicense(Dependency d, String license) {
|
|
||||||
if (d.getLicense() == null) {
|
|
||||||
d.setLicense(license);
|
|
||||||
} else if (!d.getLicense().contains(license)) {
|
|
||||||
d.setLicense(d.getLicense() + NEWLINE + license);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The initialize method does nothing for this Analyzer.
|
* The initialize method does nothing for this Analyzer.
|
||||||
|
*
|
||||||
|
* @throws Exception thrown if there is an exception
|
||||||
*/
|
*/
|
||||||
public void initialize() {
|
@Override
|
||||||
|
public void initialize() throws Exception {
|
||||||
//do nothing
|
//do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The close method does nothing for this Analyzer.
|
* The close method does nothing for this Analyzer.
|
||||||
|
*
|
||||||
|
* @throws Exception thrown if there is an exception
|
||||||
*/
|
*/
|
||||||
public void close() {
|
@Override
|
||||||
|
public void close() throws Exception {
|
||||||
//do nothing
|
//do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user