{"record":{"id":"0aeda41f40262441","repo":"quarkusio/quarkus","slug":"unsupported-value-value","errorCode":null,"errorMessage":"Unsupported value: ${value}","messagePattern":"Unsupported value: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/recording/BytecodeRecorderImpl.java","lineNumber":1980,"sourceCode":"                        retValue = valueMethod.load(value.asDouble());\n                        break;\n                    case CHARACTER:\n                        retValue = valueMethod.load(value.asChar());\n                        break;\n                    case CLASS:\n                        retValue = valueMethod.loadClassFromTCCL(value.asClass().name().toString());\n                        break;\n                    case ARRAY:\n                        retValue = arrayValue(value, valueMethod, method, annotationClass);\n                        break;\n                    case ENUM:\n                        retValue = valueMethod\n                                .readStaticField(FieldDescriptor.of(value.asEnumType().toString(), value.asEnum(),\n                                        value.asEnumType().toString()));\n                        break;\n                    case NESTED:\n                    default:\n                        throw new UnsupportedOperationException(\"Unsupported value: \" + value);\n                }\n                return retValue;\n            }\n        };\n    }\n\n    static ResultHandle arrayValue(AnnotationValue value, BytecodeCreator valueMethod, MethodInfo method,\n            ClassInfo annotationClass) {\n        ResultHandle retValue;\n        switch (value.componentKind()) {\n            case CLASS:\n                Type[] classArray = value.asClassArray();\n                retValue = valueMethod.newArray(componentType(method), valueMethod.load(classArray.length));\n                for (int i = 0; i < classArray.length; i++) {\n                    valueMethod.writeArrayValue(retValue, i, valueMethod.loadClassFromTCCL(classArray[i].name().toString()));\n                }\n                break;\n            case STRING:","sourceCodeStart":1962,"sourceCodeEnd":1998,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/recording/BytecodeRecorderImpl.java#L1962-L1998","documentation":"BytecodeRecorderImpl supports recording enum-valued ConfigurationState entries as CONSTANT_POOL, FIELD, or ENUM storage types. When a recorded value falls into NESTED (or any unknown) category, the value loader has no strategy to emit it and throws UnsupportedOperationException('Unsupported value: ...').","triggerScenarios":"Reading a recorded configuration key whose value was stored as NESTED — i.e. a complex/nested config object — through the enum value-loading path (loadEnum or similar), rather than through object serialization.","commonSituations":"A config property is an object/nested group but is consumed in code expecting a simple enum value; extension config changed from enum to nested object (or vice versa) during a refactor; misuse of the recording API with a nested config value where only enums/primitives are supported.","solutions":["Flatten the nested config value into primitives/Strings/enums before recording","Use an ObjectSubstitution or proper serialization for the complex object instead of the enum path","Record the enum value explicitly so it uses the CONSTANT_POOL/ENUM path","Check whether the config type should be an enum mapping (@ConfigMapping with enums) rather than a nested object"],"exampleFix":"// before\n// recorded value: nested object passed where enum expected -> NESTED storage\n// after\nmyConfig.myEnum = Mode.FAST; // simple enum value, not a nested group","handlingStrategy":"validation","validationCode":"// ensure only simple values reach the enum/value load path\nif (!(value instanceof Enum || value instanceof String || value instanceof Number || value instanceof Boolean)) {\n    throw new IllegalArgumentException(\"Value must be a simple constant, not nested: \" + value);\n}","typeGuard":null,"tryCatchPattern":"try {\n    recordedLoader.apply(value);\n} catch (UnsupportedOperationException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Unsupported value:\")) {\n        throw new IllegalStateException(\"Flatten/serialize nested config value before recording\", e);\n    }\n    throw e;\n}","preventionTips":["Record only primitives, Strings and enums through the value path","Use ObjectSubstitution for complex/nested objects","Keep config shapes stable when refactoring extensions"],"tags":["build-time","bytecode-recorder","configuration","quarkus-extension"],"backgroundTag":"unsupported-config-value-type","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"}