Skip to content

Commit 2ce36bd

Browse files
committed
#2803: don't handle exceptions in UfedXmlReader.isSupported()
1 parent e8b430f commit 2ce36bd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,9 @@ public boolean isSupported(File datasource) {
164164
}
165165

166166
// supports any folder with valid XML report inside
167-
try (InputStream xmlReport = lookUpXmlReportInputStream(datasource)) {
168-
return xmlReport != null;
169-
} catch (Exception e) {
170-
return false;
171-
}
167+
InputStream xmlReport = lookUpXmlReportInputStream(datasource);
168+
IOUtil.closeQuietly(xmlReport);
169+
return xmlReport != null;
172170
}
173171

174172
private InputStream getXmlInputStream(File file) {

0 commit comments

Comments
 (0)