I have recently seen an example of what I think is a clear violation of ISP, but my colleague argued it is easier to use. This is what happened:
- We had
Optionsclass that had 2 fields sent as a parameter to one of the methods where both fields were in use.
- Then there was a new field added that was used in another method, but original method never needed it.
So that when you call a first method you have to send an option that has a field that is totally irrelevant for the method.
I have not seen applications of ISP to classes/requests, and not just interfaces itself, but I consider this as a part of the interface actually.
So I am wondering if this is a part of ISP or not.