A great example of this is ByteArrayOutputStream's close(). It's documented to do literally nothing, and yet you still have to "handle" an IOException that will never, ever happen.
https://docs.oracle.com/javase/7/docs/api/java/io/ByteArrayO...
https://docs.oracle.com/javase/7/docs/api/java/io/ByteArrayO...