Skip to content

Commit f4fd33b

Browse files
authored
Catch all exceptions, not just IOException, when unable to read Jandex file (helidon-io#3626)
1 parent f631c7c commit f4fd33b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

microprofile/openapi/src/main/java/io/helidon/microprofile/openapi/OpenApiCdiExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ private IndexView existingIndexFileReader() throws IOException {
165165
try (InputStream indexIS = indexURL.openStream()) {
166166
LOGGER.log(Level.CONFIG, "Adding Jandex index at {0}", indexURL.toString());
167167
indices.add(new IndexReader(indexIS).read());
168-
} catch (IOException ex) {
168+
} catch (Exception ex) {
169169
throw new IOException("Attempted to read from previously-located index file "
170-
+ indexURL + " but the index cannot be found", ex);
170+
+ indexURL + " but the index cannot be read", ex);
171171
}
172172
}
173173
return indices.size() == 1 ? indices.get(0) : CompositeIndex.create(indices);

0 commit comments

Comments
 (0)