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;
|
resourceDesc = resourcePath;
|
||||||
}
|
}
|
||||||
InputStream result = null;
|
InputStream result = null;
|
||||||
if (result == null) {
|
try {
|
||||||
try {
|
// Try absolute path ...
|
||||||
// Try absolute path ...
|
Path filePath = FileSystems.getDefault().getPath(resourcePath).toAbsolutePath();
|
||||||
Path filePath = FileSystems.getDefault().getPath(resourcePath).toAbsolutePath();
|
File f = filePath.toFile();
|
||||||
File f = filePath.toFile();
|
if (f.exists() && f.isFile() && f.canRead()) {
|
||||||
if (f.exists() && f.isFile() && f.canRead()) {
|
result = new BufferedInputStream(new FileInputStream(f));
|
||||||
result = new BufferedInputStream(new FileInputStream(f));
|
|
||||||
}
|
|
||||||
logMessage(result, logger, resourceDesc, "on filesystem at " + filePath);
|
|
||||||
}
|
|
||||||
catch (InvalidPathException e) {
|
|
||||||
// just continue ...
|
|
||||||
}
|
|
||||||
catch (FileNotFoundException e) {
|
|
||||||
// just continue ...
|
|
||||||
}
|
}
|
||||||
|
logMessage(result, logger, resourceDesc, "on filesystem at " + filePath);
|
||||||
|
}
|
||||||
|
catch (InvalidPathException e) {
|
||||||
|
// just continue ...
|
||||||
|
}
|
||||||
|
catch (FileNotFoundException e) {
|
||||||
|
// just continue ...
|
||||||
}
|
}
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user