diff --git a/core/deployment/src/main/java/io/quarkus/deployment/index/IndexWrapper.java b/core/deployment/src/main/java/io/quarkus/deployment/index/IndexWrapper.java index 904e38123913cd..a0d5ff80c8c6be 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/index/IndexWrapper.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/index/IndexWrapper.java @@ -35,6 +35,16 @@ public class IndexWrapper implements IndexView { private static final Logger LOGGER = Logger.getLogger(CombinedIndexBuildStep.class); + private static final Set PRIMITIVE_TYPES = Set.of( + "boolean", + "byte", + "short", + "int", + "long", + "float", + "double", + "char"); + private final IndexView index; private final ClassLoader deploymentClassLoader; final Map> additionalClasses; @@ -300,6 +310,10 @@ private Optional computeAdditional(DotName className) { static boolean index(Indexer indexer, String className, ClassLoader classLoader) { boolean result = false; + if (PRIMITIVE_TYPES.contains(className) || className.startsWith("[")) { + // Ignore primitives and arrays + return false; + } try (InputStream stream = classLoader .getResourceAsStream(className.replace('.', '/') + ".class")) { if (stream != null) {