Skip to content

Commit

Permalink
Minor code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Nov 20, 2024
1 parent d557c69 commit cc29d8d
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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);
}
}
);
Expand Down Expand Up @@ -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());
}
});
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit cc29d8d

Please sign in to comment.