mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 10:01:35 +01:00
findbugs/checkstyle patches
Former-commit-id: b00c0681a799cea260a2aa6de6aa210709199589
This commit is contained in:
@@ -218,7 +218,7 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
|
|||||||
final String oneParent = one.getParent();
|
final String oneParent = one.getParent();
|
||||||
final String twoParent = two.getParent();
|
final String twoParent = two.getParent();
|
||||||
if (oneParent != null) {
|
if (oneParent != null) {
|
||||||
if (twoParent != null && oneParent.equals(twoParent)) {
|
if (oneParent.equals(twoParent)) {
|
||||||
fileName1 = one.getName();
|
fileName1 = one.getName();
|
||||||
fileName2 = two.getName();
|
fileName2 = two.getName();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -409,9 +409,10 @@ public class CveDB {
|
|||||||
*/
|
*/
|
||||||
Properties getProperties() {
|
Properties getProperties() {
|
||||||
final Properties prop = new Properties();
|
final Properties prop = new Properties();
|
||||||
|
PreparedStatement ps = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
try {
|
try {
|
||||||
final PreparedStatement ps = getConnection().prepareStatement(SELECT_PROPERTIES);
|
ps = getConnection().prepareStatement(SELECT_PROPERTIES);
|
||||||
rs = ps.executeQuery();
|
rs = ps.executeQuery();
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
prop.setProperty(rs.getString(1), rs.getString(2));
|
prop.setProperty(rs.getString(1), rs.getString(2));
|
||||||
@@ -421,6 +422,7 @@ public class CveDB {
|
|||||||
Logger.getLogger(CveDB.class.getName()).log(Level.SEVERE, msg);
|
Logger.getLogger(CveDB.class.getName()).log(Level.SEVERE, msg);
|
||||||
Logger.getLogger(CveDB.class.getName()).log(Level.FINE, null, ex);
|
Logger.getLogger(CveDB.class.getName()).log(Level.FINE, null, ex);
|
||||||
} finally {
|
} finally {
|
||||||
|
DBUtils.closeStatement(ps);
|
||||||
DBUtils.closeResultSet(rs);
|
DBUtils.closeResultSet(rs);
|
||||||
}
|
}
|
||||||
return prop;
|
return prop;
|
||||||
|
|||||||
@@ -140,6 +140,12 @@ public class ProcessTask implements Callable<ProcessTask> {
|
|||||||
saxParser.parse(file, cve20Handler);
|
saxParser.parse(file, cve20Handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Processes the NVD CVE XML file and imports the data into the DB.
|
||||||
|
*
|
||||||
|
* @throws UpdateException thrown if there is an error loading the data into
|
||||||
|
* the database
|
||||||
|
*/
|
||||||
private void processFiles() throws UpdateException {
|
private void processFiles() throws UpdateException {
|
||||||
String msg = String.format("Processing Started for NVD CVE - %s", filePair.getNvdCveInfo().getId());
|
String msg = String.format("Processing Started for NVD CVE - %s", filePair.getNvdCveInfo().getId());
|
||||||
Logger.getLogger(StandardUpdate.class.getName()).log(Level.INFO, msg);
|
Logger.getLogger(StandardUpdate.class.getName()).log(Level.INFO, msg);
|
||||||
|
|||||||
Reference in New Issue
Block a user