From d179b7bf3fd455d27a94914c0fb81663bbb2c76c Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Tue, 11 Jun 2013 06:23:05 -0400 Subject: [PATCH] minor updates - still no implementation though Former-commit-id: 53b5a5ad98e02cf9b18b167205079c489c75a336 --- .../analyzer/JavaScriptAnalyzer.java | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/owasp/dependencycheck/analyzer/JavaScriptAnalyzer.java b/src/main/java/org/owasp/dependencycheck/analyzer/JavaScriptAnalyzer.java index c377b92ac..8322cbbe8 100644 --- a/src/main/java/org/owasp/dependencycheck/analyzer/JavaScriptAnalyzer.java +++ b/src/main/java/org/owasp/dependencycheck/analyzer/JavaScriptAnalyzer.java @@ -31,7 +31,7 @@ import java.util.regex.Pattern; * @author Jeremy Long (jeremy.long@owasp.org) */ public class JavaScriptAnalyzer extends AbstractAnalyzer implements Analyzer { - + // /** * The name of the analyzer. @@ -48,6 +48,7 @@ public class JavaScriptAnalyzer extends AbstractAnalyzer implements Analyzer { /** * Returns a list of file EXTENSIONS supported by this analyzer. + * * @return a list of file EXTENSIONS supported by this analyzer. */ public Set getSupportedExtensions() { @@ -56,6 +57,7 @@ public class JavaScriptAnalyzer extends AbstractAnalyzer implements Analyzer { /** * Returns the name of the analyzer. + * * @return the name of the analyzer. */ 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. + * * @param extension the file extension to test for support. * @return whether or not the specified file extension is supported by this * analyzer. @@ -74,6 +77,7 @@ public class JavaScriptAnalyzer extends AbstractAnalyzer implements Analyzer { /** * Returns the phase that the analyzer is intended to run in. + * * @return the phase that the analyzer is intended to run in. */ public AnalysisPhase getAnalysisPhase() { @@ -81,11 +85,6 @@ public class JavaScriptAnalyzer extends AbstractAnalyzer implements Analyzer { } // - /** - * 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 * 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. + * + * @throws Exception thrown if there is an exception */ - public void initialize() { + @Override + public void initialize() throws Exception { //do nothing } /** * 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 } - }