findbugs/checkstyle patches

Former-commit-id: b796c6631e20064fe2098721995a271b6cb44f66
This commit is contained in:
Jeremy Long
2014-01-03 14:56:18 -05:00
parent b9f3c41a9d
commit 97238b764f
3 changed files with 10 additions and 2 deletions

View File

@@ -218,7 +218,7 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
final String oneParent = one.getParent();
final String twoParent = two.getParent();
if (oneParent != null) {
if (twoParent != null && oneParent.equals(twoParent)) {
if (oneParent.equals(twoParent)) {
fileName1 = one.getName();
fileName2 = two.getName();
} else {

View File

@@ -409,9 +409,10 @@ public class CveDB {
*/
Properties getProperties() {
final Properties prop = new Properties();
PreparedStatement ps = null;
ResultSet rs = null;
try {
final PreparedStatement ps = getConnection().prepareStatement(SELECT_PROPERTIES);
ps = getConnection().prepareStatement(SELECT_PROPERTIES);
rs = ps.executeQuery();
while (rs.next()) {
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.FINE, null, ex);
} finally {
DBUtils.closeStatement(ps);
DBUtils.closeResultSet(rs);
}
return prop;

View File

@@ -140,6 +140,12 @@ public class ProcessTask implements Callable<ProcessTask> {
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 {
String msg = String.format("Processing Started for NVD CVE - %s", filePair.getNvdCveInfo().getId());
Logger.getLogger(StandardUpdate.class.getName()).log(Level.INFO, msg);