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.
In
src/main/java/org/apache/maven/shared/filtering/MultiDelimiterInterpolatorFilterReaderLineEnding.java, line 207:A new
BoundedReaderis created on every singleread()invocation. The constructor callsthis.in.mark(markLength)on the sharedBufferedReader, setting a new mark at the current stream position each time. This is:reset()silently failsThe
BoundedReaderwas designed for use within a single logical read operation but is being used as a disposable per-character wrapper.