mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 00:29:21 +01:00
coverity recommended changes
This commit is contained in:
@@ -38,7 +38,7 @@ public class AntLoggerAdapter extends MarkerIgnoringBase {
|
|||||||
/**
|
/**
|
||||||
* A reference to the Ant task used for logging.
|
* A reference to the Ant task used for logging.
|
||||||
*/
|
*/
|
||||||
private Task task;
|
private transient Task task;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs an Ant Logger Adapter.
|
* Constructs an Ant Logger Adapter.
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ public class CveDB {
|
|||||||
*
|
*
|
||||||
* @return the properties from the database
|
* @return the properties from the database
|
||||||
*/
|
*/
|
||||||
Properties getProperties() {
|
synchronized Properties getProperties() {
|
||||||
final Properties prop = new Properties();
|
final Properties prop = new Properties();
|
||||||
PreparedStatement ps = null;
|
PreparedStatement ps = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
@@ -285,7 +285,7 @@ public class CveDB {
|
|||||||
* @param key the property key
|
* @param key the property key
|
||||||
* @param value the property value
|
* @param value the property value
|
||||||
*/
|
*/
|
||||||
void saveProperty(String key, String value) {
|
synchronized void saveProperty(String key, String value) {
|
||||||
try {
|
try {
|
||||||
try {
|
try {
|
||||||
final PreparedStatement mergeProperty = getConnection().prepareStatement(statementBundle.getString("MERGE_PROPERTY"));
|
final PreparedStatement mergeProperty = getConnection().prepareStatement(statementBundle.getString("MERGE_PROPERTY"));
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ public final class Settings {
|
|||||||
* @param deleteTemporary flag indicating whether any temporary directories
|
* @param deleteTemporary flag indicating whether any temporary directories
|
||||||
* generated should be removed
|
* generated should be removed
|
||||||
*/
|
*/
|
||||||
public static void cleanup(boolean deleteTemporary) {
|
public static synchronized void cleanup(boolean deleteTemporary) {
|
||||||
if (deleteTemporary && tempDirectory != null && tempDirectory.exists()) {
|
if (deleteTemporary && tempDirectory != null && tempDirectory.exists()) {
|
||||||
FileUtils.delete(tempDirectory);
|
FileUtils.delete(tempDirectory);
|
||||||
tempDirectory = null;
|
tempDirectory = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user