yegor256 / cactoos

Object-Oriented Java primitives, as an alternative to Google Guava and Apache Commons
https://www.cactoos.org
MIT License
736 stars 163 forks source link

Put @Deprecated annotation on disabled methods #1505

Open andreoss opened 3 years ago

andreoss commented 3 years ago

We can annotate disabled methods which throw UnsupportedOperationException (i.e mutation methods on Collection) in order to provide an extra clue for static analyzers and IDEs about them.

fabriciofx commented 3 years ago

@andreoss I think it a good idea. @victornoel WDYT?

victornoel commented 3 years ago

@andreoss @fabriciofx I'm not clear what this does provide exactly in practice… I'm a bit reluctant to annotate a method with something that is not really the "truth" without a good reason :)