diff --git a/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java b/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java index 8881904..1f49ea7 100644 --- a/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java +++ b/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java @@ -241,7 +241,7 @@ private void execute(@Nonnull URI uri, @Nonnull FeatureContextAware context) { if (feature.isPresent()) { context.executeWithContext(feature.get()); } else { - LOGGER.warn("Unable to locate corresponding Feature for URI: " + uri); + LOGGER.warn("Unable to locate corresponding Feature for URI: {}", uri); } } @@ -313,7 +313,7 @@ private void execute(@Nonnull TestCase testCase, @Nonnull ScenarioContextAware c if (scenario.isPresent()) { context.executeWithContext(f, scenario.get()); } else { - LOGGER.warn("Unable to locate corresponding Feature or Scenario context for URI: " + uri + "; line: " + line); + LOGGER.warn("Unable to locate corresponding Feature or Scenario context for URI: {}; line: {}", uri, line); } } ); @@ -800,7 +800,7 @@ protected void handleSourceEvents(TestSourceParsed parseEvent) { if (n instanceof Feature) { featureContextMap.put(uri, new FeatureContext(uri, (Feature) n)); } else { - LOGGER.warn("Unknown node type: " + n.getClass().getSimpleName()); + LOGGER.warn("Unknown node type: {}", n.getClass().getSimpleName()); } }); } @@ -979,10 +979,7 @@ protected ItemStatus mapItemStatus(@Nullable Status status) { return null; } else { if (STATUS_MAPPING.get(status) == null) { - LOGGER.error(format( - "Unable to find direct mapping between Cucumber and ReportPortal for TestItem with status: '%s'.", - status - )); + LOGGER.error("Unable to find direct mapping between Cucumber and ReportPortal for TestItem with status: '{}'.", status); return ItemStatus.SKIPPED; } return STATUS_MAPPING.get(status); @@ -1095,7 +1092,7 @@ protected String getCodeRef(@Nonnull TestStep testStep) { } } } catch (Throwable e) { - LOGGER.error("Unable to get java code reference for the Test Step: " + cucumberLocation, e); + LOGGER.error("Unable to get java code reference for the Test Step: {}", cucumberLocation, e); return cucumberLocation; } return cucumberLocation;