mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 16:49:43 +01:00
added new save properties method to support changes for issue #82
Former-commit-id: 56480f2d0233a03aed83ec0e8c8092f599cd0a62
This commit is contained in:
@@ -91,7 +91,7 @@ public class DatabaseProperties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a properties file containing the last updated date to the VULNERABLE_CPE directory.
|
* Saves the last updated information to the properties file.
|
||||||
*
|
*
|
||||||
* @param updatedValue the updated NVD CVE entry
|
* @param updatedValue the updated NVD CVE entry
|
||||||
* @throws UpdateException is thrown if there is an update exception
|
* @throws UpdateException is thrown if there is an update exception
|
||||||
@@ -100,8 +100,19 @@ public class DatabaseProperties {
|
|||||||
if (updatedValue == null) {
|
if (updatedValue == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
properties.put(LAST_UPDATED_BASE + updatedValue.getId(), String.valueOf(updatedValue.getTimestamp()));
|
save(LAST_UPDATED_BASE + updatedValue.getId(), String.valueOf(updatedValue.getTimestamp()));
|
||||||
cveDB.saveProperty(LAST_UPDATED_BASE + updatedValue.getId(), String.valueOf(updatedValue.getTimestamp()));
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Saves the key value pair to the properties store.
|
||||||
|
*
|
||||||
|
* @param key the property key
|
||||||
|
* @param value the property value
|
||||||
|
* @throws UpdateException is thrown if there is an update exception
|
||||||
|
*/
|
||||||
|
public void save(String key, String value) throws UpdateException {
|
||||||
|
properties.put(key, value);
|
||||||
|
cveDB.saveProperty(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user