javadoc update

This commit is contained in:
Jeremy Long
2017-12-09 08:14:21 -05:00
parent 63a2874cec
commit 1e72c49eb2

View File

@@ -42,7 +42,6 @@ import static org.owasp.dependencycheck.data.nvdcve.CveDB.PreparedStatementCveDb
//CSOFF: AvoidStarImport //CSOFF: AvoidStarImport
//CSON: AvoidStarImport //CSON: AvoidStarImport
/** /**
* The database holding information about the NVD CVE data. This class is safe * The database holding information about the NVD CVE data. This class is safe
* to be accessed from multiple threads in parallel, however internally only one * to be accessed from multiple threads in parallel, however internally only one
@@ -502,6 +501,7 @@ public final class CveDB implements AutoCloseable {
* the code. * the code.
* <p> * <p>
* It should be also called when DB is closed. * It should be also called when DB is closed.
* </p>
*/ */
private synchronized void clearCache() { private synchronized void clearCache() {
vulnerabilitiesForCpeCache.clear(); vulnerabilitiesForCpeCache.clear();
@@ -726,7 +726,7 @@ public final class CveDB implements AutoCloseable {
insertReference.setString(2, r.getName()); insertReference.setString(2, r.getName());
insertReference.setString(3, r.getUrl()); insertReference.setString(3, r.getUrl());
insertReference.setString(4, r.getSource()); insertReference.setString(4, r.getSource());
if(isBatchInsertEnabled()) { if (isBatchInsertEnabled()) {
insertReference.addBatch(); insertReference.addBatch();
countReferences++; countReferences++;
if (countReferences % getBatchSize() == 0) { if (countReferences % getBatchSize() == 0) {
@@ -783,7 +783,7 @@ public final class CveDB implements AutoCloseable {
} else { } else {
insertSoftware.setString(3, vulnerableSoftware.getPreviousVersion()); insertSoftware.setString(3, vulnerableSoftware.getPreviousVersion());
} }
if(isBatchInsertEnabled()) { if (isBatchInsertEnabled()) {
insertSoftware.addBatch(); insertSoftware.addBatch();
countSoftware++; countSoftware++;
if (countSoftware % getBatchSize() == 0) { if (countSoftware % getBatchSize() == 0) {
@@ -846,7 +846,8 @@ public final class CveDB implements AutoCloseable {
} }
/** /**
* Executes batch inserts of vulnerabilities when property database.batchinsert.maxsize is reached * Executes batch inserts of vulnerabilities when property
* database.batchinsert.maxsize is reached
* *
* @param pVulnerability * @param pVulnerability
* @param pVulnerableSoftware * @param pVulnerableSoftware
@@ -1037,6 +1038,7 @@ public final class CveDB implements AutoCloseable {
* This method is only referenced in unused code. * This method is only referenced in unused code.
* <p> * <p>
* Deletes unused dictionary entries from the database. * Deletes unused dictionary entries from the database.
* </p>
*/ */
public synchronized void deleteUnusedCpe() { public synchronized void deleteUnusedCpe() {
clearCache(); clearCache();
@@ -1056,6 +1058,7 @@ public final class CveDB implements AutoCloseable {
* MySQL if ever used due to the MERGE statement. * MySQL if ever used due to the MERGE statement.
* <p> * <p>
* Merges CPE entries into the database. * Merges CPE entries into the database.
* </p>
* *
* @param cpe the CPE identifier * @param cpe the CPE identifier
* @param vendor the CPE vendor * @param vendor the CPE vendor