From 0ca27bfd70b7bb8b775be9ac8653b6133171ba9d Mon Sep 17 00:00:00 2001 From: PeeAyBee Date: Wed, 31 Jan 2024 12:22:53 +0300 Subject: [PATCH] EPMRPP-89281 || Fix class cast issue using string (#979) --- .github/workflows/release.yml | 2 +- .../ta/reportportal/dao/custom/ElasticSearchClient.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c42af481..37541c6f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ env: SCRIPTS_VERSION: 5.11.0 BOM_VERSION: 5.11.1 MIGRATIONS_VERSION: 5.11.0 - RELEASE_VERSION: 5.11.4 + RELEASE_VERSION: 5.11.5 jobs: release: diff --git a/src/main/java/com/epam/ta/reportportal/dao/custom/ElasticSearchClient.java b/src/main/java/com/epam/ta/reportportal/dao/custom/ElasticSearchClient.java index 75946687f..f36d33a93 100644 --- a/src/main/java/com/epam/ta/reportportal/dao/custom/ElasticSearchClient.java +++ b/src/main/java/com/epam/ta/reportportal/dao/custom/ElasticSearchClient.java @@ -359,8 +359,14 @@ private HttpEntity getStringHttpEntity(String body) { return new HttpEntity<>(body, headers); } + /** + * Returns long value through the string cast to avoid different types returned from text engine + * + * @param longVal Object from text engine response + * @return Long value + */ private Long getLongValue(Object longVal) { - return Long.valueOf((String) longVal); + return Long.valueOf(String.valueOf(longVal)); } }