Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Commit 2444ab8

Browse files
Merge pull request #187 from tatlax3636/fix-empty-response
Account for {} in auditResponse
2 parents 88f7a47 + b56edbd commit 2444ab8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<artifactId>api-audit</artifactId>
55
<packaging>jar</packaging>
66
<name>${project.groupId}:${project.artifactId}</name>
7-
<version>3.7.31-SNAPSHOT</version>
7+
<version>3.7.32-SNAPSHOT</version>
88
<description>Hygieia Audit Rest API Layer</description>
99
<url>https://github.com/Hygieia/${repository.name}</url>
1010

src/main/java/com/capitalone/dashboard/service/DashboardAuditServiceImpl.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.google.common.collect.Sets;
2828
import org.apache.commons.collections.CollectionUtils;
2929
import org.apache.commons.collections4.IterableUtils;
30+
import org.apache.commons.lang3.ObjectUtils;
3031
import org.apache.commons.lang3.StringUtils;
3132
import org.json.simple.JSONObject;
3233
import org.springframework.beans.factory.annotation.Autowired;
@@ -296,7 +297,7 @@ public JSONObject getAuditReport(DashboardAuditRequest dashboardAuditRequest) {
296297

297298
AuditReport auditReport = auditReportRepository.findTop1ByBusinessApplicationAndBusinessServiceAndAuditTypeAndIdentifierNameAndIdentifierVersionAndIdentifierUrlOrderByTimestampDesc(
298299
businessApplication, businessService, auditType, identifierName, identifierVersion, identifierUrl);
299-
if (Objects.nonNull(auditReport) && Objects.nonNull(auditReport.getAuditResponse())) {
300+
if (Objects.nonNull(auditReport) && !ObjectUtils.isEmpty(auditReport.getAuditResponse())) {
300301
return (JSONObject) auditReport.getAuditResponse();
301302
}else{
302303
Cmdb busServItem = cmdbRepository.findByConfigurationItemAndItemType(businessService, "app");

0 commit comments

Comments
 (0)