[GitHub] [commons-io] garydgregory commented on pull request #119: Add a MarkShieldInputStream

2020-06-11 Thread GitBox


garydgregory commented on pull request #119:
URL: https://github.com/apache/commons-io/pull/119#issuecomment-642752890


   > @garydgregory If you look at `java.io.InputStream` source code - the 
default is to throw an exception when reset is called if mark is unsupported... 
so I am just following the defacto Java standard.
   
   Yes, but `InputStream` is an abstract class, so there are no instances of it 
flying around. Why should this class blow up that call instead of passing it 
on? Or, does it make sense to have this class shield _both_ `mark()` _and_ 
`reset()`?
   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-io] garydgregory commented on pull request #119: Add a MarkShieldInputStream

2020-06-01 Thread GitBox


garydgregory commented on pull request #119:
URL: https://github.com/apache/commons-io/pull/119#issuecomment-637090936


   Yeah, this gets tricky and arbitrary: the class is called "MarkShield" which 
reimplements `mark()` as a noop but it also reimplements `reset()` to throw an 
`IOException`, which feels like a surprise to me (not in a good way.) Why 
should one method be a noop and the other throw an exception? It seems to be 
they both should be noops. WDYT?
   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-io] garydgregory commented on pull request #119: Add a MarkShieldInputStream

2020-06-01 Thread GitBox


garydgregory commented on pull request #119:
URL: https://github.com/apache/commons-io/pull/119#issuecomment-636991133


   We work hard to avoid breaking binary compatibility. Instead, we mark code 
as deprecated and that code can then be considered for removal for the next 
major version, which would include a package name change along with a matching 
Maven coordinate change. 
   Let me poke around later...



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-io] garydgregory commented on pull request #119: Add a MarkShieldInputStream

2020-06-01 Thread GitBox


garydgregory commented on pull request #119:
URL: https://github.com/apache/commons-io/pull/119#issuecomment-636981406


   Before we need one more and one more shield types of ProxyInputStreams, 
shouldn't we consider a more general shield class that takes an enum {CLOSE, 
MARK, THIS, THAT} so we can just have a single one?



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org