Skip to content

Commit 39169a0

Browse files
author
Julien Kronegg
committed
fix: added changelog #2971
1 parent 1b1c4f1 commit 39169a0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1010
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1111

1212
## [Unreleased]
13+
### Added
14+
- [Core] Improve caching glue performance ([#2971](https://github.com/cucumber/cucumber-jvm/pull/2971) M.P. Korstanje & Julien Kronegg)
1315

1416
## [7.21.0] - 2025-02-02
1517
### Added

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
@@ -246,16 +246,17 @@ void prepareGlue(Locale locale) throws DuplicateStepDefinitionException {
246246
boolean firstTime = stepTypeRegistry == null;
247247
boolean languageChanged = !locale.equals(this.locale);
248248
boolean mustRebuildCache = false;
249-
if (firstTime || languageChanged || this.dirtyCache) {
249+
if (firstTime || languageChanged || dirtyCache) {
250250
// conditions changed => invalidate the glue cache
251251
this.locale = locale;
252252
stepTypeRegistry = new StepTypeRegistry(locale);
253253
stepExpressionFactory = new StepExpressionFactory(stepTypeRegistry, bus);
254254
stepDefinitionsByPattern.clear();
255255
stepPatternByStepText.clear();
256256
mustRebuildCache = true;
257-
this.dirtyCache = false; // since we must rebuild the cache, it will
258-
// not be dirty the next time
257+
// since we must rebuild the cache, it will not be dirty the next
258+
// time
259+
dirtyCache = false;
259260
}
260261

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

0 commit comments

Comments
 (0)