I can't believe I ran into this bug in manner very similar to the author and just assumed it was the expected behavior. I didn't bother to go read the actual doc of getResource to check and didn't think much of it partly because it was a RuntimeException (IllegalArgument).
IIRC I just wrapped getResource so that if it returned null or threw any exception (which is a bad idea but whatever) I would throw IOException as it fit in to what I was doing at that time.
11
u/agentoutlier Apr 26 '21
I can't believe I ran into this bug in manner very similar to the author and just assumed it was the expected behavior. I didn't bother to go read the actual doc of getResource to check and didn't think much of it partly because it was a RuntimeException (IllegalArgument).
IIRC I just wrapped
getResourceso that if it returned null or threw any exception (which is a bad idea but whatever) I would throw IOException as it fit in to what I was doing at that time.