Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPMRPP-89281 || Fix class cast issue #978

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
SCRIPTS_VERSION: 5.11.0
BOM_VERSION: 5.11.1
MIGRATIONS_VERSION: 5.11.0
RELEASE_VERSION: 5.11.3
RELEASE_VERSION: 5.11.4

jobs:
release:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private List<Long> searchTestItemIdsByConditions(Long projectId, JSONObject sear
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(hits)) {
for (LinkedHashMap<String, Object> hit : hits) {
Map<String, Object> source = (Map<String, Object>) hit.get("_source");
Long testItemId = (Long) source.get("itemId");
Long testItemId = getLongValue(source.get("itemId"));
testItemIds.add(testItemId);
}

Expand Down Expand Up @@ -250,10 +250,10 @@ private LogMessage convertElasticDataToLogMessage(Long projectId, Map<String, Ob
timestampString += "." + "0".repeat(6);
}

return new LogMessage((Long) source.get("id"),
return new LogMessage(getLongValue(source.get("id")),
LocalDateTime.parse(timestampString, DateTimeFormatter.ofPattern(ELASTIC_DATETIME_FORMAT)),
(String) source.get("message"), (Long) source.get("itemId"),
(Long) source.get("launchId"), projectId
(String) source.get("message"), getLongValue(source.get("itemId")),
getLongValue(source.get("launchId")), projectId
);
}

Expand Down Expand Up @@ -359,4 +359,8 @@ private HttpEntity<String> getStringHttpEntity(String body) {
return new HttpEntity<>(body, headers);
}

private Long getLongValue(Object longVal) {
return Long.valueOf((String) longVal);
}

}
Loading