[Java] Add another exception for “Resources should be closed” (S2095)

S2095 finds resources that have not been closed, but also has exceptions for classes where close() has no effect (like java.io.StringReader and java.io.ByteArrayOutputStream).

I would like to request that org.apache.commons.io.output.NullOutputStream is added to the exceptions list. It does not override the no-op close() method in java.io.OutputStream.

And, if possible, it would be cool if it could auto-ignore any class that has a parent with a no-op close() method and doesn’t override it. This would have caught Apache’s NullOutputStream without needing to add an explicit exclusion. Just an idea…