Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 0d96989

Browse files
authored
fix: NoSuchMethodError closeQuietly(java.io.Closeable[]) (#6377)
1 parent a6c3909 commit 0d96989

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

core/src/main/java/org/owasp/dependencycheck/data/update/nvd/api/JsonArrayCveItemSource.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,20 @@ public JsonArrayCveItemSource(InputStream inputStream) throws IOException {
4848

4949
@Override
5050
public void close() throws Exception {
51-
IOUtils.closeQuietly(jsonParser, inputStream);
51+
if (jsonParser != null) {
52+
try {
53+
jsonParser.close();
54+
} catch (IOException ex) {
55+
//ignore
56+
}
57+
}
58+
if (inputStream != null) {
59+
try {
60+
inputStream.close();
61+
} catch (IOException ex) {
62+
//ignore
63+
}
64+
}
5265
}
5366

5467
@Override

0 commit comments

Comments
 (0)