From 838ff48e9319e238bb6abc55bd384f878619d5f1 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Tue, 23 Jan 2024 18:15:40 +0300 Subject: [PATCH] Client version update --- CHANGELOG.md | 2 ++ build.gradle | 7 ++++--- .../epam/reportportal/junit/ReportPortalListener.java | 11 +++++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e817606..48bca4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] +### Changed +- Client version updated on [5.2.1](https://github.com/reportportal/client-java/releases/tag/5.2.1), by @HardNorth ## [5.1.3] ### Changed diff --git a/build.gradle b/build.gradle index 4d03331..9d7a9ce 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ repositories { } dependencies { - api 'com.epam.reportportal:client-java:5.1.22' + api 'com.epam.reportportal:client-java:5.2.1' api 'com.epam.reportportal:commons-model:5.0.0' api 'com.nordstrom.tools:junit-foundation:17.0.3' api 'com.google.code.findbugs:jsr305:3.0.2' @@ -40,8 +40,8 @@ dependencies { testImplementation 'org.hamcrest:hamcrest-core:2.2' testImplementation "org.mockito:mockito-core:${project.mockito_version}" testImplementation "org.mockito:mockito-junit-jupiter:${project.mockito_version}" - testImplementation 'ch.qos.logback:logback-classic:1.3.8' - testImplementation 'com.epam.reportportal:logger-java-logback:5.1.6' + testImplementation 'ch.qos.logback:logback-classic:1.3.12' + testImplementation 'com.epam.reportportal:logger-java-logback:5.2.0' testImplementation ("org.junit.platform:junit-platform-runner:${project.junit5_runner_version}") { exclude module: 'junit' } @@ -52,6 +52,7 @@ dependencies { testImplementation 'pl.pragmatists:JUnitParams:1.1.1' testImplementation "org.powermock:powermock-module-junit4:${project.powermock_version}" testImplementation "org.powermock:powermock-api-mockito2:${project.powermock_version}" + testImplementation 'com.squareup.okhttp3:okhttp:4.12.0' } test { diff --git a/src/main/java/com/epam/reportportal/junit/ReportPortalListener.java b/src/main/java/com/epam/reportportal/junit/ReportPortalListener.java index 0ac120b..b117922 100644 --- a/src/main/java/com/epam/reportportal/junit/ReportPortalListener.java +++ b/src/main/java/com/epam/reportportal/junit/ReportPortalListener.java @@ -958,9 +958,10 @@ protected List getMethodParameters(@Nonnull final FrameworkMe try { Optional> constructor = Arrays.stream(method.getDeclaringClass().getConstructors()).findFirst(); if (constructor.isPresent()) { - result.addAll(ParameterUtils.getParameters(constructor.get(), - Arrays.asList((Object[]) Accessible.on(runner).field("parameters").getValue()) - )); + Object[] params = (Object[]) Accessible.on(runner).field("parameters").getValue(); + if(params != null) { + result.addAll(ParameterUtils.getParameters(constructor.get(), Arrays.asList(params))); + } } } catch (NoSuchFieldException e) { LOGGER.warn("Unable to get parameters for parameterized runner", e); @@ -968,7 +969,9 @@ protected List getMethodParameters(@Nonnull final FrameworkMe } else if (callable != null) { try { Object[] params = (Object[]) Accessible.on(callable).field("val$params").getValue(); - result.addAll(ParameterUtils.getParameters(method.getMethod(), Arrays.asList(params))); + if(params != null) { + result.addAll(ParameterUtils.getParameters(method.getMethod(), Arrays.asList(params))); + } } catch (NoSuchFieldException e) { LOGGER.warn("Unable to get parameters for parameterized runner", e); }