You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2026/07/29 13:50:14 UTC
[I] [maven-4.0.x] InputLocation.merge() always loses line/column information [maven]
elharo opened a new issue, #12610:
URL: https://github.com/apache/maven/issues/12610
# InputLocation.merge() always loses line/column information
**Found in:** maven-4.0.x branch
**File:** `api/maven-api-model/src/main/java/org/apache/maven/api/model/InputLocation.java` (method `merge()`, lines ~215-240)
**Severity:** Low
## Description
The `merge()` result always has `lineNumber = -1` and `columnNumber = -1`, discarding the original location information from both `target` and `source`:
```java
return InputLocation.of(-1, -1, InputSource.merge(source.getSource(), target.getSource()), locations);
```
While merging line numbers from two different source files is inherently ambiguous, there is no fallback to preserve at least one of the original locations. If `source` or `target` has valid line/column data, that information is lost, degrading the quality of error reporting for merged models.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [maven-4.0.x] InputLocation.merge() always loses line/column information [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed issue #12610: [maven-4.0.x] InputLocation.merge() always loses line/column information
URL: https://github.com/apache/maven/issues/12610
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org