mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-26 02:51:27 +01:00
spelling errors corrected
Former-commit-id: bf7ed2bf57b54a1acc916945963d07c0bb8f6675
This commit is contained in:
@@ -186,7 +186,7 @@ public class Engine {
|
|||||||
* Runs the analyzers against all of the dependencies.
|
* Runs the analyzers against all of the dependencies.
|
||||||
*/
|
*/
|
||||||
public void analyzeDependencies() {
|
public void analyzeDependencies() {
|
||||||
//phase one initilize
|
//phase one initialize
|
||||||
for (AnalysisPhase phase : AnalysisPhase.values()) {
|
for (AnalysisPhase phase : AnalysisPhase.values()) {
|
||||||
List<Analyzer> analyzerList = analyzers.get(phase);
|
List<Analyzer> analyzerList = analyzers.get(phase);
|
||||||
for (Analyzer a : analyzerList) {
|
for (Analyzer a : analyzerList) {
|
||||||
@@ -194,7 +194,7 @@ public class Engine {
|
|||||||
a.initialize();
|
a.initialize();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Logger.getLogger(Engine.class.getName()).log(Level.SEVERE,
|
Logger.getLogger(Engine.class.getName()).log(Level.SEVERE,
|
||||||
"Exception occured initializing " + a.getName() + ".", ex);
|
"Exception occurred initializing " + a.getName() + ".", ex);
|
||||||
try {
|
try {
|
||||||
a.close();
|
a.close();
|
||||||
} catch (Exception ex1) {
|
} catch (Exception ex1) {
|
||||||
|
|||||||
@@ -190,9 +190,9 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
analyzePOM(dependency);
|
analyzePOM(dependency);
|
||||||
addPredefinedData(dependency);
|
addPredefinedData(dependency);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new AnalysisException("Exception occured reading the JAR file.", ex);
|
throw new AnalysisException("Exception occurred reading the JAR file.", ex);
|
||||||
} catch (JAXBException ex) {
|
} catch (JAXBException ex) {
|
||||||
throw new AnalysisException("Exception occured reading the POM within the JAR file.", ex);
|
throw new AnalysisException("Exception occurred reading the POM within the JAR file.", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ public class CPEAnalyzer implements org.codesecure.dependencycheck.analyzer.Anal
|
|||||||
for (Evidence e : ec.iterator(confidenceFilter)) {
|
for (Evidence e : ec.iterator(confidenceFilter)) {
|
||||||
String value = e.getValue();
|
String value = e.getValue();
|
||||||
|
|
||||||
//hack to get around the fact that lucene does a realy good job of recognizing domains and not
|
//hack to get around the fact that lucene does a really good job of recognizing domains and not
|
||||||
// splitting them. TODO - put together a better lucene analyzer specific to the domain.
|
// splitting them. TODO - put together a better lucene analyzer specific to the domain.
|
||||||
if (value.startsWith("http://")) {
|
if (value.startsWith("http://")) {
|
||||||
value = value.substring(7).replaceAll("\\.", " ");
|
value = value.substring(7).replaceAll("\\.", " ");
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import java.util.logging.Logger;
|
|||||||
public class CweDB {
|
public class CweDB {
|
||||||
|
|
||||||
private CweDB() {
|
private CweDB() {
|
||||||
//empty contructor for utility class
|
//empty constructor for utility class
|
||||||
}
|
}
|
||||||
private static final HashMap<String, String> CWE = loadData();
|
private static final HashMap<String, String> CWE = loadData();
|
||||||
|
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ public final class TokenPairConcatenatingFilter extends TokenFilter {
|
|||||||
@Override
|
@Override
|
||||||
public boolean incrementToken() throws IOException {
|
public boolean incrementToken() throws IOException {
|
||||||
|
|
||||||
//collect all the terms into the words collaction
|
//collect all the terms into the words collection
|
||||||
while (input.incrementToken()) {
|
while (input.incrementToken()) {
|
||||||
String word = new String(termAtt.buffer(), 0, termAtt.length());
|
String word = new String(termAtt.buffer(), 0, termAtt.length());
|
||||||
words.add(word);
|
words.add(word);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if we have a previousTerm - write it out as its own token concatonated
|
//if we have a previousTerm - write it out as its own token concatenated
|
||||||
// with the current word (if one is available).
|
// with the current word (if one is available).
|
||||||
if (previousWord != null && words.size() > 0) {
|
if (previousWord != null && words.size() > 0) {
|
||||||
String word = words.getFirst();
|
String word = words.getFirst();
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ public class CveDB {
|
|||||||
*/
|
*/
|
||||||
public void updateVulnerability(Vulnerability vuln) throws DatabaseException {
|
public void updateVulnerability(Vulnerability vuln) throws DatabaseException {
|
||||||
try {
|
try {
|
||||||
// first delete any existing vulnerabilty info.
|
// first delete any existing vulnerability info.
|
||||||
deleteReferences.setString(1, vuln.getName());
|
deleteReferences.setString(1, vuln.getName());
|
||||||
deleteReferences.execute();
|
deleteReferences.execute();
|
||||||
deleteSoftware.setString(1, vuln.getName());
|
deleteSoftware.setString(1, vuln.getName());
|
||||||
|
|||||||
@@ -89,14 +89,14 @@ public final class CliParser {
|
|||||||
if (isRunScan()) {
|
if (isRunScan()) {
|
||||||
validatePathExists(getScanFiles());
|
validatePathExists(getScanFiles());
|
||||||
if (!line.hasOption(ArgumentName.OUT)) {
|
if (!line.hasOption(ArgumentName.OUT)) {
|
||||||
//TODO - need a new exception type here, this isn't really a parseexception.
|
//TODO - need a new exception type here, this isn't really a ParseException.
|
||||||
throw new ParseException("Scan cannot be run without specifying a directory "
|
throw new ParseException("Scan cannot be run without specifying a directory "
|
||||||
+ "to write the reports to via the 'out' argument.");
|
+ "to write the reports to via the 'out' argument.");
|
||||||
} else {
|
} else {
|
||||||
String p = line.getOptionValue(ArgumentName.OUT, "");
|
String p = line.getOptionValue(ArgumentName.OUT, "");
|
||||||
File f = new File(p);
|
File f = new File(p);
|
||||||
if ("".equals(p) || !(f.exists() && f.isDirectory())) {
|
if ("".equals(p) || !(f.exists() && f.isDirectory())) {
|
||||||
//TODO - need a new exception type here, this isn't really a parseexception.
|
//TODO - need a new exception type here, this isn't really a ParseException.
|
||||||
throw new ParseException("A valid directory name must be specified for "
|
throw new ParseException("A valid directory name must be specified for "
|
||||||
+ "the 'out' argument.");
|
+ "the 'out' argument.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public class Downloader {
|
|||||||
writer = null;
|
writer = null;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Logger.getLogger(Downloader.class.getName()).log(Level.FINEST,
|
Logger.getLogger(Downloader.class.getName()).log(Level.FINEST,
|
||||||
"Error closing the writter in Downloader.", ex);
|
"Error closing the writer in Downloader.", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (reader != null) {
|
if (reader != null) {
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class FieldAnalyzerTest {
|
|||||||
|
|
||||||
assertEquals("Did not find 1 document?", 1, hits.length);
|
assertEquals("Did not find 1 document?", 1, hits.length);
|
||||||
|
|
||||||
searchAnalyzerProduct.clear(); //ensure we don't have anything left over from the previuos search.
|
searchAnalyzerProduct.clear(); //ensure we don't have anything left over from the previous search.
|
||||||
searchAnalyzerVendor.clear();
|
searchAnalyzerVendor.clear();
|
||||||
querystr = "product:(Apache Struts) vendor:(Apache)";
|
querystr = "product:(Apache Struts) vendor:(Apache)";
|
||||||
Query q2 = parser.parse(querystr);
|
Query q2 = parser.parse(querystr);
|
||||||
|
|||||||
Reference in New Issue
Block a user