try-with-resources and null resource
tom.hawtin at oracle.com
tom.hawtin at oracle.com
Thu Jan 27 04:56:41 PST 2011
On 27/01/2011 12:19, Gernot Neppert wrote:
> Actually, I think that Class.getResourceAsStream is a notable
> exception with its null-semantics.
Indeed. It's a broken design. How often do you think the check is done
(followed by a reasonable [in]action) and how often just an NPE on use?
A resource missing can be considered much the same as a missing class,
so an unchecked exception would have done the ticket. That's the past,
so long as we know it is a weirdity and don't copy it.
Tom
More information about the coin-dev
mailing list