File file = new File(resourceLocation);
if (!file.isAbsolute()) {
try {
file = file.getCanonicalFile();
} catch (IOException e) {
throw new ResourceNotFoundException(resourceLocation, String.format(
"Unable to resolve relative path to absolute path: %s", resourceLocation), e);
}
}
return file;