From 7e5f708353bd22ebe9b4ebe9ec9f54741d261633 Mon Sep 17 00:00:00 2001 From: U117293 Date: Thu, 14 Nov 2024 10:29:43 +0100 Subject: [PATCH] fix: additional code cleanup for #2902 --- .../java/io/cucumber/core/runner/CachingGlue.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/cucumber-core/src/main/java/io/cucumber/core/runner/CachingGlue.java b/cucumber-core/src/main/java/io/cucumber/core/runner/CachingGlue.java index 34c373940e..00645ce9ec 100644 --- a/cucumber-core/src/main/java/io/cucumber/core/runner/CachingGlue.java +++ b/cucumber-core/src/main/java/io/cucumber/core/runner/CachingGlue.java @@ -278,14 +278,8 @@ void prepareGlue(Locale locale) throws DuplicateStepDefinitionException { stepTypeRegistry.defineParameterType(parameterType); emitParameterTypeDefined(ptd); }); - - dataTableTypeDefinitions.forEach(dtd -> { - stepTypeRegistry.defineDataTableType(dtd.dataTableType()); - }); - - docStringTypeDefinitions.forEach(dtd -> { - stepTypeRegistry.defineDocStringType(dtd.docStringType()); - }); + dataTableTypeDefinitions.forEach(dtd -> stepTypeRegistry.defineDataTableType(dtd.dataTableType())); + docStringTypeDefinitions.forEach(dtd -> stepTypeRegistry.defineDocStringType(dtd.docStringType())); } if (defaultParameterTransformers.size() == 1) { @@ -487,11 +481,9 @@ void removeScenarioScopedGlue() { dirty |= removeScenarioScopedGlue(defaultParameterTransformers); dirty |= removeScenarioScopedGlue(defaultDataTableEntryTransformers); dirty |= removeScenarioScopedGlue(defaultDataTableCellTransformers); - if (dirty) { stepDefinitionsByPattern.clear(); } - } private boolean removeScenarioScopedGlue(Iterable glues) {