Skip to content

Commit

Permalink
version logs
Browse files Browse the repository at this point in the history
  • Loading branch information
memeeerit committed Nov 30, 2023
1 parent cd13c91 commit 625e57c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ public int insertOrUpdateVulnerabilityFull(CompositeVulnerability vuln, boolean
vvStatement.executeUpdate();
rs = vvStatement.getGeneratedKeys();
if (rs.next()) {
vuln.setVersionId(rs.getInt(1));
int versionId = rs.getInt(1);
int versionIdByName = rs.getInt("vuln_version_id");
log.info("rs.getInt(1) returned {}\nrs.getInt(\"vuln_version_id\") returned {}", versionId, versionIdByName);
vuln.setVersionId(versionId);
}
// if we're updating, copy over the vdo/cpe pointers to this new version
if (!newVuln) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ public List<String> parseIds(String jsonString) {
*/
private String genJson(int vulnVersionId) {
try {
logger.info("about to send a vuln version id of {}", String.valueOf(vulnVersionId));
Map<String, String> cveJson = Map.of("vulnVersionId", String.valueOf(vulnVersionId));
return OM.writeValueAsString(cveJson);
} catch (JsonProcessingException e) {
Expand Down

0 comments on commit 625e57c

Please sign in to comment.