requireResourceNonNull
Wrap all calls to Class.getResource or Class.getResourceAsStream using this method to enforce existence of the resource. This code works around those methods returning null to signal non-existence.
Return
the resource passed in if existent
Parameters
resource
return value of above methods
name
of resource
Throws
FileNotFoundException
if resource was not found