{"record":{"id":"c41e2c3420ec0fec","repo":"quarkusio/quarkus","slug":"array-component-kind-is","errorCode":null,"errorMessage":"Array component kind is ","messagePattern":"Array component kind is ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/AnnotationLiteralProcessor.java","lineNumber":319,"sourceCode":"                        } else if (ConstantDescs.CD_long.equals(componentType)) {\n                            yield bc.getStaticField(FieldDescs.ANNOTATION_LITERALS_EMPTY_LONG_ARRAY);\n                        } else if (ConstantDescs.CD_float.equals(componentType)) {\n                            yield bc.getStaticField(FieldDescs.ANNOTATION_LITERALS_EMPTY_FLOAT_ARRAY);\n                        } else if (ConstantDescs.CD_double.equals(componentType)) {\n                            yield bc.getStaticField(FieldDescs.ANNOTATION_LITERALS_EMPTY_DOUBLE_ARRAY);\n                        } else if (ConstantDescs.CD_char.equals(componentType)) {\n                            yield bc.getStaticField(FieldDescs.ANNOTATION_LITERALS_EMPTY_CHAR_ARRAY);\n                        } else if (ConstantDescs.CD_String.equals(componentType)) {\n                            yield bc.getStaticField(FieldDescs.ANNOTATION_LITERALS_EMPTY_STRING_ARRAY);\n                        } else if (ConstantDescs.CD_Class.equals(componentType)) {\n                            yield bc.getStaticField(FieldDescs.ANNOTATION_LITERALS_EMPTY_CLASS_ARRAY);\n                        } else {\n                            yield bc.newEmptyArray(componentType, Const.of(0));\n                        }\n                    }\n                    default -> {\n                        // at this point, the only possible component kind is \"array\"\n                        throw new UnsupportedOperationException(\"Array component kind is \" + componentKind\n                                + \", this should never happen\");\n                    }\n                };\n            }\n            default -> throw new UnsupportedOperationException(\"Unsupported value: \" + annotationMemberValue);\n        };\n    }\n\n    private static ClassDesc componentTypeOf(MethodInfo annotationMember) {\n        assert annotationMember.returnType().kind() == Type.Kind.ARRAY;\n        return classDescOf(annotationMember.returnType().asArrayType().componentType());\n    }\n\n    // ---\n\n    private static String componentType(MethodInfo method) {\n        return componentTypeName(method).toString();\n    }","sourceCodeStart":301,"sourceCodeEnd":337,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/AnnotationLiteralProcessor.java#L301-L337","documentation":"In loadValue's ARRAY handling, Arc switches on the component kind; the default branch should be unreachable because nested-arrays of arrays are not valid annotation values. Hitting it throws UnsupportedOperationException 'Array component kind is ...' — a defensive guard indicating an internal invariant violation.","triggerScenarios":"An annotation member value of array kind whose componentKind is itself array (array-of-array) or otherwise falls through all known component kinds.","commonSituations":"Rarely hit by users; typically indicates corrupted/invalid Jandex metadata, a Jandex version mismatch producing unexpected AnnotationValue kinds, or a compiler/tooling bug writing malformed annotation values.","solutions":["Upgrade/align Jandex versions to a release consistent with Arc","Rebuild the index (clean) to eliminate stale metadata","Reduce the annotation to valid (non-array-of-array) types; report a bug if reproducible"],"exampleFix":"// before\npublic @interface Conf { String[][] values(); } // invalid annotation member type\n// after\npublic @interface Conf { String[] values(); }","handlingStrategy":"try-catch","validationCode":"if (v.componentKind() == AnnotationValue.Kind.ARRAY) throw new IllegalStateException(\"nested arrays invalid\");","typeGuard":null,"tryCatchPattern":"try { expr = processor.create(bc, cls, ann); } catch (UnsupportedOperationException e) { /* invalid nested array */ }","preventionTips":["Avoid nested-array annotation members"],"tags":["arc","cdi","jandex","annotations"],"backgroundTag":"annotation-retention-runtime-required","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}