Skip to content

Commit

Permalink
Merge pull request #199 from nitram84/sonarqube_issues
Browse files Browse the repository at this point in the history
fix issues found with SonarQube
  • Loading branch information
DanielFran authored Jul 13, 2023
2 parents a46b465 + 1996c5c commit b94578e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ public class AsyncEntityAuditEventWriter implements EntityAuditEventWriter {
try {
Field privateLongField = entityClass.getDeclaredField("id");
privateLongField.setAccessible(true);
entityId = (Object) privateLongField.get(entity);
entityId = privateLongField.get(entity);
privateLongField.setAccessible(false);
entityData = objectMapper.writeValueAsString(entity);
} catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException | IOException e) {
log.error("Exception while getting entity ID and content {}", e);
log.error("Exception while getting entity ID and content", e);
// returning null as we don't want to raise an application exception here
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class EntityAuditEventListener extends AuditingEntityListener {
try {
entityAuditEventWriter.writeAuditEvent(target, action);
} catch (Exception e) {
log.error("Exception while persisting delete audit entity {}", e);
log.error("Exception while persisting delete audit entity", e);
}
}

Expand Down

0 comments on commit b94578e

Please sign in to comment.