GpxListIterator: fix primer nodes capturing stale list head#206
Merged
bailuk merged 1 commit intobailuk:stagefrom Feb 26, 2026
Merged
GpxListIterator: fix primer nodes capturing stale list head#206bailuk merged 1 commit intobailuk:stagefrom
bailuk merged 1 commit intobailuk:stagefrom
Conversation
The Java-to-Kotlin conversion in PR bailuk#202 changed the primer node getNext() overrides from dynamic methods into stored properties (override var next = ...), which captured the list's first element once at construction time. When GpxListWriter creates the iterator on an initially empty list, the primer's next stays null permanently, so writeNewPoints() never iterates and no points are written to the GPX log file. Fix by using computed properties that read the current list head on every access, matching the original Java behavior. Regression introduced in bailuk#202
Contributor
Author
|
@bailuk, this fixes a serious regression which broke the GPX logger completely. I lost today's 200km ride :-( |
Owner
Sorry for that. I do not always fully test changes before merging them into stage. Stage is kind of a developer branch that should get more stable when coming closer to a release. |
Owner
|
I will extend |
Contributor
Author
|
No problem, I know that riding with an unstable branch has these risks. And I could recover the positional data from my Beacon server and convert it to a GPX. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Java-to-Kotlin conversion in PR #202 changed the primer node getNext() overrides from dynamic methods into stored properties (override var next = ...), which captured the list's first element once at construction time. When GpxListWriter creates the iterator on an initially empty list, the primer's next stays null permanently, so writeNewPoints() never iterates and no points are written to the GPX log file.
Fix by using computed properties that read the current list head on every access, matching the original Java behavior.
Regression introduced in #202