commons-io icon indicating copy to clipboard operation
commons-io copied to clipboard

IO-568: AutoCloseInputStream should disable mark/reset

Open tmortagne opened this issue 7 years ago • 3 comments

tmortagne avatar Feb 08 '18 11:02 tmortagne

I am glad that you have some flexibility here and for the civil discourse as well :-) My main concern is for compatibility so throwing an exception in the place where code worked before is a bad thing.

What is the exception you are seeing?

garydgregory avatar Feb 08 '18 16:02 garydgregory

What is the exception you are seeing?

Sorry, I actually meant reset() only since reset is supposed to throw an exception when markSupported() return false. For mark() I would just not call the target InpuStream mark() method. For the exception itself I was thinking about the standard throw new IOException("mark/reset not supported");.

tmortagne avatar Feb 08 '18 16:02 tmortagne

Here is a new version which does not completely abandon AutoCloseInputStream to its fate but still don't change its default behavior.

tmortagne avatar Feb 19 '18 12:02 tmortagne