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/01 15:35:25 UTC
[I] BoundedReader recreated on every read() call [maven-filtering]
elharo opened a new issue, #353:
URL: https://github.com/apache/maven-filtering/issues/353
In `src/main/java/org/apache/maven/shared/filtering/MultiDelimiterInterpolatorFilterReaderLineEnding.java`, line 207:
```
BoundedReader in = new BoundedReader(this.in, markLength);
```
A new `BoundedReader` is created on every single `read()` invocation. The constructor calls `this.in.mark(markLength)` on the shared `BufferedReader`, setting a new mark at the current stream position each time. This is:
- **Inefficient** — allocates a new wrapper object and resets the mark on every character read
- **Fragile** — if the underlying reader's mark buffer is insufficient between calls, `reset()` silently fails
The `BoundedReader` was designed for use within a single logical read operation but is being used as a disposable per-character wrapper.
--
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] BoundedReader recreated on every read() call [maven-filtering]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed issue #353: BoundedReader recreated on every read() call
URL: https://github.com/apache/maven-filtering/issues/353
--
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