diff --git a/core/deployment/src/main/java/io/quarkus/deployment/index/IndexingUtil.java b/core/deployment/src/main/java/io/quarkus/deployment/index/IndexingUtil.java index 7a573e3b77f62..d0d4cbee7f08b 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/index/IndexingUtil.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/index/IndexingUtil.java @@ -257,13 +257,13 @@ public Index apply(PathVisit visit) { } try (InputStream in = Files.newInputStream(visit.getPath())) { IndexReader reader = new IndexReader(in); - if (reader.getIndexVersion() < REQUIRED_INDEX_VERSION) { - log.warnf( - "Re-indexing %s - at least Jandex 2.1 must be used to index an application dependency", - visit.getPath()); - return null; - } try { + if (reader.getIndexVersion() < REQUIRED_INDEX_VERSION) { + log.warnf( + "Re-indexing %s - at least Jandex 2.1 must be used to index an application dependency", + visit.getPath()); + return null; + } return reader.read(); } catch (UnsupportedVersion e) { throw new UnsupportedVersion(