{"record":{"id":"0c3aa0508e408892","repo":"quarkusio/quarkus","slug":"annotation-annotation-placed-on-target-mus","errorCode":null,"errorMessage":"Annotation '<annotation>' placed on '<target>' must not have blank value","messagePattern":"Annotation '<annotation>' placed on '<target>' must not have blank value","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/EagerSecurityInterceptorBindingBuildItem.java","lineNumber":85,"sourceCode":"\n    public DotName[] getAnnotationBindings() {\n        return annotationBindings;\n    }\n\n    Function<String, Consumer<RoutingContext>> getInterceptorCreator() {\n        return interceptorCreator;\n    }\n\n    public String getBindingValue(AnnotationInstance annotationInstance, DotName annotation,\n            AnnotationTarget annotationTarget) {\n        if (bindingValueExtractor != null) {\n            return bindingValueExtractor.apply(annotationInstance);\n        }\n        if (bindingToValue.containsKey(annotation.toString())) {\n            return bindingToValue.get(annotation.toString());\n        }\n        if (annotationInstance.value() == null || annotationInstance.value().asString().isBlank()) {\n            throw new ConfigurationException(\"Annotation '\" + annotation + \"' placed on '\"\n                    + toTargetName(annotationTarget) + \"' must not have blank value\");\n        }\n        return annotationInstance.value().asString();\n    }\n\n    public static String toTargetName(AnnotationTarget target) {\n        if (target.kind() == AnnotationTarget.Kind.METHOD) {\n            return target.asMethod().declaringClass().name().toString() + \"#\" + target.asMethod().name();\n        } else {\n            return target.asClass().name().toString();\n        }\n    }\n\n    boolean requiresSecurityCheck() {\n        return requiresSecurityCheck;\n    }\n\n    boolean allowToRepeatThisInterceptorBinding() {","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/EagerSecurityInterceptorBindingBuildItem.java#L67-L103","documentation":"EagerSecurityInterceptorBindingBuildItem.getBindingValue extracts the value of a security interceptor binding annotation placed on an endpoint. Quarkus requires the annotation's value attribute to be present and non-blank, otherwise it cannot construct a meaningful binding; a blank value triggers ConfigurationException naming the annotation and target.","triggerScenarios":"Placing an annotation (e.g. a custom security binding) with @Attribute required but blank/empty value on a JAX-RS endpoint or route that EagerSecurityInterceptorProcessing intercepts; addInterceptedEndpoint -> getBindingValue throws when annotationInstance.value() is null or asString().isBlank().","commonSituations":"Hand-writing @MySecurityBinding(\"\") or @MySecurityBinding (with optional value left unset) on endpoints; copy-pasting annotations from examples without filling values; refactors that clear annotation values.","solutions":["Provide a concrete value on the annotation: @MyBinding(\"some-value\")","Mark the annotation attribute required so the build fails fast at the declaration site","Check the target named in the error message and fix the annotation there"],"exampleFix":"// before\n@MySecurityBinding(\"\")\npublic Response get() { ... }\n\n// after\n@MySecurityBinding(\"tenant-a\")\npublic Response get() { ... }","handlingStrategy":"validation","validationCode":"AnnotationInstance ann = target.annotation(BINDING_NAME);\nif (ann == null || ann.value() == null || ann.value().asString().isBlank()) {\n    throw new IllegalArgumentException(BINDING_NAME + \" requires a non-blank value on \" + target);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make the annotation attribute required (no default) so javac rejects blank usage","Add an ArchUnit/deployment test validating annotation values on endpoints","Review annotation usages when copy-pasting endpoint code"],"tags":["annotation","security","configuration"],"backgroundTag":"blank-annotation-value","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}