Fix MavenStaxReader location reporting for properties by gnodet · Pull Request #11402 · apache/maven (original) (raw)

@gnodet gnodet changed the titleFix MavenStaxReader location reporting to point to start of XML tags Fix MavenStaxReader location reporting for properties

Nov 6, 2025

@gnodet

The location for properties (Map elements) was being captured AFTER calling nextText(), which moves the parser position past the element. This resulted in incorrect location information.

This commit fixes the timing of location capture for properties by saving the line and column numbers BEFORE calling nextText().

Changes:

All tests pass successfully.

gnodet added a commit to gnodet/maven that referenced this pull request

Nov 6, 2025

@gnodet

The location for properties (Map elements) was being captured AFTER calling nextText(), which moves the parser position past the element. This resulted in incorrect location information.

This commit fixes the timing of location capture for properties by saving the line and column numbers BEFORE calling nextText().

Changes:

(cherry picked from commit 6f5c837)

Conflicts:

src/mdo/reader-stax.vm

gnodet added a commit that referenced this pull request

Nov 6, 2025

@gnodet

The location for properties (Map elements) was being captured AFTER calling nextText(), which moves the parser position past the element. This resulted in incorrect location information.

This commit fixes the timing of location capture for properties by saving the line and column numbers BEFORE calling nextText().

Changes:

(cherry picked from commit 6f5c837)

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

[ Show hidden characters]({{ revealButtonHref }})