fixed typos

Former-commit-id: 490de2990dab978493b27a8faf8ec6c40b97c6dc
This commit is contained in:
Jeremy Long
2014-01-12 07:35:03 -05:00
parent 41a31cdf4c
commit 9b04ceedf1
13 changed files with 46 additions and 50 deletions

View File

@@ -36,7 +36,7 @@ import org.owasp.dependencycheck.utils.Settings;
*/
public abstract class AbstractSuppressionAnalyzer extends AbstractAnalyzer {
//<editor-fold defaultstate="collapsed" desc="All standard implmentation details of Analyzer">
//<editor-fold defaultstate="collapsed" desc="All standard implementation details of Analyzer">
/**
* Returns a list of file EXTENSIONS supported by this analyzer.
*

View File

@@ -434,8 +434,10 @@ public class CPEAnalyzer implements Analyzer {
final List<String> list = new ArrayList<String>();
String tempWord = null;
for (String word : words) {
//single letter words should be concatonated with the next word.
// so { "m", "core", "sample" } -> { "mcore", "sample" }
/*
single letter words should be concatenated with the next word.
so { "m", "core", "sample" } -> { "mcore", "sample" }
*/
if (tempWord != null) {
list.add(tempWord + word);
tempWord = null;
@@ -560,7 +562,7 @@ public class CPEAnalyzer implements Analyzer {
dbVer = DependencyVersionUtil.parseVersion(vs.getVersion());
}
if (dbVer == null //special case, no version specified - everything is vulnerable
|| evVer.equals(dbVer)) { //woot exect match
|| evVer.equals(dbVer)) { //yeah! exact match
final String url = String.format("http://web.nvd.nist.gov/view/vuln/search?cpe=%s", URLEncoder.encode(vs.getName(), "UTF-8"));
final IdentifierMatch match = new IdentifierMatch("cpe", vs.getName(), url, IdentifierConfidence.EXACT_MATCH, conf);
collected.add(match);
@@ -626,7 +628,7 @@ public class CPEAnalyzer implements Analyzer {
private static class IdentifierMatch implements Comparable<IdentifierMatch> {
/**
* Constructs an IdentiferMatch.
* Constructs an IdentifierMatch.
*
* @param type the type of identifier (such as CPE)
* @param value the value of the identifier

View File

@@ -56,7 +56,7 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
*/
private boolean analyzed = false;
//</editor-fold>
//<editor-fold defaultstate="collapsed" desc="All standard implmentation details of Analyzer">
//<editor-fold defaultstate="collapsed" desc="All standard implementation details of Analyzer">
/**
* The set of file extensions supported by this analyzer.
*/
@@ -196,7 +196,7 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
/**
* Returns true if the file names (and version if it exists) of the two
* dependencies are sufficiently similiar.
* dependencies are sufficiently similar.
*
* @param dependency1 a dependency2 to compare
* @param dependency2 a dependency2 to compare

View File

@@ -258,7 +258,7 @@ public class DirectorySpinLock implements Closeable /*, AutoCloseable*/ {
try {
lock.release();
} catch (ClosedChannelException ex) {
Logger.getLogger(DirectorySpinLock.class.getName()).log(Level.FINEST, "Uable to release file lock", ex);
Logger.getLogger(DirectorySpinLock.class.getName()).log(Level.FINEST, "Unable to release file lock", ex);
} catch (IOException ex) {
Logger.getLogger(DirectorySpinLock.class.getName()).log(Level.FINEST, "Unable to release file lock due to IO Exception", ex);
}

View File

@@ -220,7 +220,7 @@ public final class ConnectionFactory {
* the database.
*
* @param conn the database connection object
* @throws DatabaseException thrown if the schema version is not compatable
* @throws DatabaseException thrown if the schema version is not compatible
* with this version of dependency-check
*/
private static void ensureSchemaVersion(Connection conn) throws DatabaseException {

View File

@@ -131,7 +131,7 @@ public class PropertyType {
}
}
//<editor-fold defaultstate="collapsed" desc="standard implmentations of hashCode, equals, and toString">
//<editor-fold defaultstate="collapsed" desc="standard implementations of hashCode, equals, and toString">
/**
* Default implementation of hashCode.
*

View File

@@ -62,15 +62,15 @@ public class SuppressionHandler extends DefaultHandler {
/**
* A list of suppression rules.
*/
private List<SuppressionRule> supressionRules = new ArrayList<SuppressionRule>();
private List<SuppressionRule> suppressionRules = new ArrayList<SuppressionRule>();
/**
* Get the value of supressionRules.
* Get the value of suppressionRules.
*
* @return the value of supressionRules
* @return the value of suppressionRules
*/
public List<SuppressionRule> getSupressionRules() {
return supressionRules;
public List<SuppressionRule> getSuppressionRules() {
return suppressionRules;
}
/**
* The current rule being read.
@@ -109,7 +109,7 @@ public class SuppressionHandler extends DefaultHandler {
/**
* Handles the end element event.
*
* @param uri the uri of the element
* @param uri the URI of the element
* @param localName the local name of the element
* @param qName the qName of the element
* @throws SAXException thrown if there is an exception processing
@@ -117,7 +117,7 @@ public class SuppressionHandler extends DefaultHandler {
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
if (SUPPRESS.equals(qName)) {
supressionRules.add(rule);
suppressionRules.add(rule);
rule = null;
} else if (FILE_PATH.equals(qName)) {
final PropertyType pt = processPropertyType();
@@ -151,8 +151,8 @@ public class SuppressionHandler extends DefaultHandler {
}
/**
* Processes field members that have been collected during the characters
* and startElement method to construct a PropertyType object.
* Processes field members that have been collected during the characters and startElement method to construct a
* PropertyType object.
*
* @return a PropertyType object
*/

View File

@@ -43,24 +43,20 @@ import org.xml.sax.XMLReader;
public class SuppressionParser {
/**
* JAXP Schema Language. Source:
* http://docs.oracle.com/javase/tutorial/jaxp/sax/validation.html
* JAXP Schema Language. Source: http://docs.oracle.com/javase/tutorial/jaxp/sax/validation.html
*/
public static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
/**
* W3C XML Schema. Source:
* http://docs.oracle.com/javase/tutorial/jaxp/sax/validation.html
* W3C XML Schema. Source: http://docs.oracle.com/javase/tutorial/jaxp/sax/validation.html
*/
public static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
/**
* JAXP Schema Source. Source:
* http://docs.oracle.com/javase/tutorial/jaxp/sax/validation.html
* JAXP Schema Source. Source: http://docs.oracle.com/javase/tutorial/jaxp/sax/validation.html
*/
public static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
/**
* Parses the given xml file and returns a list of the suppression rules
* contained.
* Parses the given xml file and returns a list of the suppression rules contained.
*
* @param file an xml file containing suppression rules
* @return a list of suppression rules
@@ -88,8 +84,7 @@ public class SuppressionParser {
xmlReader.parse(in);
return handler.getSupressionRules();
return handler.getSuppressionRules();
} catch (ParserConfigurationException ex) {
Logger.getLogger(SuppressionParser.class.getName()).log(Level.FINE, null, ex);
throw new SuppressionParseException(ex);

View File

@@ -98,7 +98,7 @@ public final class FileUtils {
* location of the JAR containing the specified class.
*
* @param configuredFilePath the configured relative or absolute path
* @param clazz the class whos path will be resolved
* @param clazz the class to resolve the path
* @return a File object
* @throws IOException is thrown if the path could not be decoded
* @deprecated This method should no longer be used. See the implementation

View File

@@ -79,7 +79,7 @@ public final class UrlStringUtils {
* <p>Example, given the following input:</p>
* <code>"https://www.somedomain.com/path1/path2/file.php?id=439"</code>
* <p>The function would return:</p>
* <code>{"somedomain", "path1", "path2", "file"}</code>
* <code>{"some.domain", "path1", "path2", "file"}</code>
*
* @param text a URL
* @return importantParts a list of the important parts of the URL

View File

@@ -23,7 +23,7 @@ data.password=DC-Pass1337!
# is not in the current classpath. Setting these properties will add the give path(s) to
# the class loader and then register the driver with the DriverManager. If the class is
# not in the path you must specify both the driver name (aka the fully qualified driver name)
# and the driver path. The driver path can be a semi-colon seperated list of files/directories
# and the driver path. The driver path can be a semi-colon separated list of files/directories
# to ensure any and all needed files can be added to the classpath to load the driver.
# For non-JDBC4 drivers in the classpath only the driver_name needs to be set.
# For MOST situations these properties likely do not need to be set.

View File

@@ -39,8 +39,8 @@ Copyright (c) 2013 Jeremy Long. All Rights Reserved.
<script type="text/javascript">
$(document).ready(function() {
var table = $("#vulnTable").stupidtable({
"severity":function(a,b){
var pattern = "([\\d.]+)";
'severity':function(a,b){
var pattern = '([\\d.]+)';
var re = new RegExp(pattern);
var aNum = re.exec(a).slice(1);
var bNum = re.exec(b).slice(1);
@@ -48,27 +48,26 @@ Copyright (c) 2013 Jeremy Long. All Rights Reserved.
}
});
table.bind('aftertablesort', function (event, data) {
var th = $(this).find("th");
var th = $(this).find('th');
th.find(".arrow").remove();
var arrow = data.direction === "asc" ? "↑" : "↓";
var arrow = data.direction === 'asc' ? '↑' : '↓';
th.eq(data.column).append('<span class="arrow">' + arrow +'</span>');
});
$("th.severity").click();
$(".expandable").click(function (e) {
$('th.severity').click();
$('.expandable').click(function (e) {
e = e || window.event;
var h = e.target || e.srcElement;
var content = "#content" + h.id.substr(6);
var header = "#" + h.id;
$(content).slideToggle("fast");
var content = '#content' + h.id.substr(6);
var header = '#' + h.id;
$(content).slideToggle('fast');
var exprx = /expandedList/;
if (exprx.exec($(header).attr("class"))) {
$(header).addClass("collapsedList");
$(header).removeClass("expandedList");
if (exprx.exec($(header).attr('class'))) {
$(header).addClass('collapsedList');
$(header).removeClass('expandedList');
} else {
$(header).addClass("expandedList");
$(header).removeClass("collapsedList");
$(header).addClass('expandedList');
$(header).removeClass('collapsedList');
}
});
});
</script>

View File

@@ -28,10 +28,10 @@ import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.junit.After;
import org.junit.AfterClass;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
@@ -61,7 +61,7 @@ public class SuppressionHandlerTest {
}
/**
* Test of getSupressionRules method, of class SuppressionHandler.
* Test of getSuppressionRules method, of class SuppressionHandler.
*
* @throws Exception thrown if there is an exception....
*/
@@ -89,7 +89,7 @@ public class SuppressionHandlerTest {
xmlReader.parse(in);
List result = handler.getSupressionRules();
List result = handler.getSuppressionRules();
assertTrue(result.size() > 3);
}
}