Skip to content

Commit 2930182

Browse files
author
Julien Kronegg
committed
fix: added changelog #2971
1 parent 9d5118c commit 2930182

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
## [Unreleased]
1313
### Fixed
1414
- [Core] Include root cause when using DataTable.asList and friends ([#2949](https://github.com/cucumber/cucumber-jvm/pull/2949) M.P. Korstanje)
15+
- [Core] Improve caching glue performance ([#2971](https://github.com/cucumber/cucumber-jvm/pull/2971) M.P. Korstanje & Julien Kronegg)
1516
- [JUnit Platform Engine] Set Engine-Version-cucumber attribute ([#2963](https://github.com/cucumber/cucumber-jvm/pull/2963) M.P. Korstanje)
1617

1718
### Changed

cucumber-core/src/main/java/io/cucumber/core/runner/CachingGlue.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,16 +245,17 @@ void prepareGlue(Locale locale) throws DuplicateStepDefinitionException {
245245
boolean firstTime = stepTypeRegistry == null;
246246
boolean languageChanged = !locale.equals(this.locale);
247247
boolean mustRebuildCache = false;
248-
if (firstTime || languageChanged || this.dirtyCache) {
248+
if (firstTime || languageChanged || dirtyCache) {
249249
// conditions changed => invalidate the glue cache
250250
this.locale = locale;
251251
stepTypeRegistry = new StepTypeRegistry(locale);
252252
stepExpressionFactory = new StepExpressionFactory(stepTypeRegistry, bus);
253253
stepDefinitionsByPattern.clear();
254254
stepPatternByStepText.clear();
255255
mustRebuildCache = true;
256-
this.dirtyCache = false; // since we must rebuild the cache, it will
257-
// not be dirty the next time
256+
// since we must rebuild the cache, it will not be dirty the next
257+
// time
258+
dirtyCache = false;
258259
}
259260

260261
// TODO: separate prepared and unprepared glue into different classes

0 commit comments

Comments
 (0)