DBZ-1621 Remove useless null check
This commit is contained in:
parent
91f0c2a520
commit
33384098fd
@ -250,22 +250,20 @@ public static InputStream getResourceAsStream(String resourcePath,
|
||||
resourceDesc = resourcePath;
|
||||
}
|
||||
InputStream result = null;
|
||||
if (result == null) {
|
||||
try {
|
||||
// Try absolute path ...
|
||||
Path filePath = FileSystems.getDefault().getPath(resourcePath).toAbsolutePath();
|
||||
File f = filePath.toFile();
|
||||
if (f.exists() && f.isFile() && f.canRead()) {
|
||||
result = new BufferedInputStream(new FileInputStream(f));
|
||||
}
|
||||
logMessage(result, logger, resourceDesc, "on filesystem at " + filePath);
|
||||
}
|
||||
catch (InvalidPathException e) {
|
||||
// just continue ...
|
||||
}
|
||||
catch (FileNotFoundException e) {
|
||||
// just continue ...
|
||||
try {
|
||||
// Try absolute path ...
|
||||
Path filePath = FileSystems.getDefault().getPath(resourcePath).toAbsolutePath();
|
||||
File f = filePath.toFile();
|
||||
if (f.exists() && f.isFile() && f.canRead()) {
|
||||
result = new BufferedInputStream(new FileInputStream(f));
|
||||
}
|
||||
logMessage(result, logger, resourceDesc, "on filesystem at " + filePath);
|
||||
}
|
||||
catch (InvalidPathException e) {
|
||||
// just continue ...
|
||||
}
|
||||
catch (FileNotFoundException e) {
|
||||
// just continue ...
|
||||
}
|
||||
if (result == null) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user