If the same stream is read in multiple plugins, then this could be difficult to investigate.
For example:
In plugin m1, the stream of a ModuleData instance is read then the ModuleData instance is added to the output pool (and not replaced by a new instance).
If plugin m2 tries to read the stream, it will get a consumed stream.
We could:
- if markIsSupported, mark the stream at creation time, reset it each time it is returned.
- if !markIsSupported, read the stream fully and expose a new ByteArrayInputStream when required.