mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 07:43:40 +01:00
pmd corrections
Former-commit-id: 7cdc5b009285b9b428d4e731cb4b493a24453a9f
This commit is contained in:
@@ -286,14 +286,12 @@ public class CPEAnalyzer implements Analyzer {
|
||||
return ret;
|
||||
} catch (ParseException ex) {
|
||||
final String msg = String.format("Unable to parse: %s", searchString);
|
||||
Logger.getLogger(CPEAnalyzer.class.getName()).log(Level.WARNING,
|
||||
"An error occured querying the CPE data. See the log for more details.");
|
||||
Logger.getLogger(CPEAnalyzer.class.getName()).log(Level.INFO, msg, ex);
|
||||
LOGGER.log(Level.WARNING, "An error occured querying the CPE data. See the log for more details.");
|
||||
LOGGER.log(Level.INFO, msg, ex);
|
||||
} catch (IOException ex) {
|
||||
final String msg = String.format("IO Error with search string: %s", searchString);
|
||||
Logger.getLogger(CPEAnalyzer.class.getName()).log(Level.WARNING,
|
||||
"An error occured reading CPE data. See the log for more details.");
|
||||
Logger.getLogger(CPEAnalyzer.class.getName()).log(Level.INFO, msg, ex);
|
||||
LOGGER.log(Level.WARNING, "An error occured reading CPE data. See the log for more details.");
|
||||
LOGGER.log(Level.INFO, msg, ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,9 @@ public final class DBUtils {
|
||||
int id = 0;
|
||||
try {
|
||||
rs = statement.getGeneratedKeys();
|
||||
rs.next();
|
||||
if (!rs.next()) {
|
||||
throw new DatabaseException("Unable to get primary key for inserted row");
|
||||
}
|
||||
id = rs.getInt(1);
|
||||
} catch (SQLException ex) {
|
||||
throw new DatabaseException("Unable to get primary key for inserted row");
|
||||
|
||||
Reference in New Issue
Block a user