From 76307c208dc5a2815947914136aa2b2c3704a565 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 19 Jan 2024 13:59:46 +0300 Subject: [PATCH] Remove redundant code --- .../java/com/epam/reportportal/cucumber/AbstractReporter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java b/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java index 5ece1b6..5c12109 100644 --- a/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java +++ b/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java @@ -82,7 +82,6 @@ public abstract class AbstractReporter implements ConcurrentEventListener { private static final String HOOK_ = "Hook: "; private static final String GET_LOCATION_METHOD_NAME = "getLocation"; private static final String METHOD_OPENING_BRACKET = "("; - private static final String DEFINITION_MATCH_FIELD_NAME = "definitionMatch"; private static final String STEP_DEFINITION_FIELD_NAME = "stepDefinition"; private static final String DOCSTRING_DECORATOR = "\n\"\"\"\n"; @@ -879,7 +878,7 @@ protected Set getAttributes(@Nonnull TestStep testStep) { protected String getCodeRef(@Nonnull TestStep testStep) { String cucumberLocation = testStep.getCodeLocation(); try { - Object stepDefinitionMatch = Accessible.on(testStep).field(DEFINITION_MATCH_FIELD_NAME).getValue(); + Object stepDefinitionMatch = Utils.getDefinitionMatch(testStep); if (stepDefinitionMatch != null) { Object javaStepDefinition = Accessible.on(stepDefinitionMatch).field(STEP_DEFINITION_FIELD_NAME).getValue(); if (javaStepDefinition != null) {