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

Commit

Permalink
fix order of serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
rvema committed Mar 28, 2022
1 parent d5ba71e commit 8b99013
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>api</artifactId>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<version>3.4.30</version>
<version>3.4.31</version>
<description>Hygieia Rest API Layer</description>
<url>https://github.com/Hygieia/api</url>

Expand Down Expand Up @@ -59,7 +59,7 @@

<properties>
<!-- Dependencies -->
<com.capitalone.dashboard.core.version>3.15.21</com.capitalone.dashboard.core.version>
<com.capitalone.dashboard.core.version>3.15.26</com.capitalone.dashboard.core.version>
<spring-security.version>4.2.18.RELEASE</spring-security.version>
<tomcat.version>8.5.70</tomcat.version>
<commons-beanutils.version>1.9.4</commons-beanutils.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,22 @@ public String createV2(BuildDataCreateRequest request) throws HygieiaException {
public BuildDataCreateResponse createV3(BuildDataCreateRequest request) throws HygieiaException {
BuildDataCreateResponse response = new BuildDataCreateResponse();
Build build = createBuild(request);
try {
org.apache.commons.beanutils.BeanUtils.copyProperties(response, build);
} catch (IllegalAccessException | InvocationTargetException e) {
throw new HygieiaException(e);
} finally {
if (settings.isLookupDashboardForBuildDataCreate()) {
String clientReference = StringUtils.isNotEmpty(build.getClientReference()) ? build.getClientReference() : request.getClientReference();
if(settings.isLookupDashboardForBuildDataCreate()) {
try {
org.apache.commons.beanutils.BeanUtils.copyProperties(response, build);
populateDashboardId(response);
} catch (IllegalAccessException | InvocationTargetException e) {
LOGGER.error("correlation_id=" + clientReference
+ ", build_url=" + build.getBuildUrl()
+ ", build_duration_millis=" + build.getDuration()
+ ", build_started_by=" + build.getStartedBy()
+ ", build_status=" + build.getBuildStatus()
+ ", hygieia_build_id=" + build.getId()
+ ", hygieia_build_view_link=" + settings.getHygieia_ui_url()+"/build/"+build.getId());
}
}
String clientReference = StringUtils.isNotEmpty(build.getClientReference()) ? build.getClientReference() : request.getClientReference();

response.setClientReference(clientReference);
// Will be refactored soon
CollectorItem buildCollectorItem = collectorItemRepository.findOne(build.getCollectorItemId());
Expand Down

0 comments on commit 8b99013

Please sign in to comment.