mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-04-01 14:43:36 +02:00
ensured resources are closed
This commit is contained in:
@@ -280,6 +280,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (pomEntries != null && pomEntries.size() <= 1) {
|
if (pomEntries != null && pomEntries.size() <= 1) {
|
||||||
|
try {
|
||||||
String path = null;
|
String path = null;
|
||||||
Properties pomProperties = null;
|
Properties pomProperties = null;
|
||||||
File pomFile = null;
|
File pomFile = null;
|
||||||
@@ -303,6 +304,13 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
jar.close();
|
||||||
|
} catch (IOException ex) {
|
||||||
|
LOGGER.trace("", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//reported possible null dereference on pomEntries is on a non-feasible path
|
//reported possible null dereference on pomEntries is on a non-feasible path
|
||||||
|
|||||||
Reference in New Issue
Block a user