From a90f8b05fc7b465c4f286462399cb677fbd579b9 Mon Sep 17 00:00:00 2001 From: Siarhei Hrabko <45555481+grabsefx@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:16:08 +0300 Subject: [PATCH] EPMRPP-90180 update dependencies (Instant time) (#53) * EPMRPP-90180 update dependencies (Instant time) * EPMRPP-90180 update dependencies (Instant time) --- build.gradle | 9 +++++---- .../jira/command/utils/JIRATicketDescriptionService.java | 6 ++++-- .../event/handler/plugin/PluginLoadedEventHandler.java | 3 ++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 25cf52f..dc96357 100644 --- a/build.gradle +++ b/build.gradle @@ -40,14 +40,15 @@ dependencies { implementation 'com.epam.reportportal:plugin-api' annotationProcessor 'com.epam.reportportal:plugin-api' } else { - implementation 'com.github.reportportal:commons-dao:fa04c1f' - implementation 'com.github.reportportal:plugin-api:20ab960' - annotationProcessor 'com.github.reportportal:plugin-api:20ab960' + implementation 'com.github.reportportal:commons-dao:0703b75' + implementation 'com.github.reportportal:plugin-api:3ecb915657' + annotationProcessor 'com.github.reportportal:plugin-api:3ecb915657' } + implementation 'org.hibernate:hibernate-core:5.6.15.Final' implementation group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1' implementation group: 'org.jooq', name: 'jooq', version: '3.14.4' - jooqRuntime 'org.postgresql:postgresql:42.2.13' + jooqRuntime 'org.postgresql:postgresql:42.7.3' compile 'ch.qos.logback:logback-classic:1.2.3' compile 'org.slf4j:slf4j-api:1.7.25' diff --git a/src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketDescriptionService.java b/src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketDescriptionService.java index b8d69cc..761aa72 100755 --- a/src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketDescriptionService.java +++ b/src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketDescriptionService.java @@ -29,6 +29,7 @@ import com.epam.reportportal.rules.exception.ErrorType; import java.text.DateFormat; import java.text.SimpleDateFormat; +import java.time.ZoneOffset; import java.util.Collections; import java.util.List; import org.apache.commons.collections.CollectionUtils; @@ -152,7 +153,8 @@ private void updateWithLog(StringBuilder descriptionBuilder, Log log, boolean in private String getFormattedMessage(Log log) { StringBuilder messageBuilder = new StringBuilder(); ofNullable(log.getLogTime()).ifPresent(logTime -> messageBuilder.append(" Time: ") - .append(dateFormat.format(TO_DATE.apply(logTime))).append(", ")); + .append(dateFormat.format( + TO_DATE.apply(logTime.atOffset(ZoneOffset.UTC).toLocalDateTime()))).append(", ")); ofNullable(log.getLogLevel()).ifPresent( logLevel -> messageBuilder.append("Level: ").append(logLevel).append(", ")); messageBuilder.append("Log: ").append(log.getLogMessage()).append("\n"); @@ -179,4 +181,4 @@ private void addAttachment(StringBuilder descriptionBuilder, Attachment attachme } } -} \ No newline at end of file +} diff --git a/src/main/java/com/epam/reportportal/extension/jira/event/handler/plugin/PluginLoadedEventHandler.java b/src/main/java/com/epam/reportportal/extension/jira/event/handler/plugin/PluginLoadedEventHandler.java index 3f7cb23..3cd9938 100644 --- a/src/main/java/com/epam/reportportal/extension/jira/event/handler/plugin/PluginLoadedEventHandler.java +++ b/src/main/java/com/epam/reportportal/extension/jira/event/handler/plugin/PluginLoadedEventHandler.java @@ -24,6 +24,7 @@ import com.epam.ta.reportportal.entity.integration.IntegrationParams; import com.epam.ta.reportportal.entity.integration.IntegrationType; +import java.time.Instant; import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; @@ -58,7 +59,7 @@ private void createIntegration(String name, IntegrationType integrationType) { Integration integration = new Integration(); integration.setName(name); integration.setType(integrationType); - integration.setCreationDate(LocalDateTime.now()); + integration.setCreationDate(Instant.now()); integration.setEnabled(true); integration.setCreator("SYSTEM"); integration.setParams(new IntegrationParams(new HashMap<>()));