{"record":{"id":"3817af3a5d98e09c","repo":"projectlombok/lombok","slug":"invalid-null-annotation-library-valid-options-no","errorCode":null,"errorMessage":"Invalid null annotation library. Valid options: none, javax, jakarta, eclipse, jetbrains, netbeans, androidx, android.support, checkerframework, findbugs, spring, jml, jspecify or CUSTOM:[TYPE_USE:]nonnull.annotation.type:nullable.annotation.type","messagePattern":"Invalid null annotation library\\. Valid options: none, javax, jakarta, eclipse, jetbrains, netbeans, androidx, android\\.support, checkerframework, findbugs, spring, jml, jspecify or CUSTOM:\\[TYPE_USE:\\]nonnull\\.annotation\\.type:nullable\\.annotation\\.type","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/core/lombok/core/configuration/NullAnnotationLibrary.java","lineNumber":125,"sourceCode":"\t\n\tpublic static String description() {\n\t\treturn \"nullity-annotation-library\";\n\t}\n\t\n\tpublic static String exampleValue() {\n\t\treturn EXAMPLE_VALUE;\n\t}\n\t\n\tpublic static NullAnnotationLibrary valueOf(String in) {\n\t\tString ci = in == null ? \"\" : in.toLowerCase();\n\t\tif (ci.length() == 0) return NONE;\n\t\tfor (NullAnnotationLibrary nal : ALL_AVAILABLE) if (nal.key.equals(ci)) return nal;\n\t\tif (!ci.startsWith(\"custom:\")) {\n\t\t\tStringBuilder out = new StringBuilder(\"Invalid null annotation library. Valid options: \");\n\t\t\tfor (NullAnnotationLibrary nal : ALL_AVAILABLE) out.append(nal.key).append(\", \");\n\t\t\tout.setLength(out.length() - 2);\n\t\t\tout.append(\" or CUSTOM:[TYPE_USE:]nonnull.annotation.type:nullable.annotation.type\");\n\t\t\tthrow new IllegalArgumentException(out.toString());\n\t\t}\n\t\tboolean typeUse = ci.startsWith(\"custom:type_use:\");\n\t\tint start = typeUse ? 16 : 7;\n\t\tint split = ci.indexOf(':', start);\n\t\tif (split == -1) {\n\t\t\tString nonNullAnnotation = in.substring(start);\n\t\t\treturn custom(verifyTypeName(nonNullAnnotation), null, typeUse);\n\t\t}\n\t\tString nonNullAnnotation = in.substring(start, split);\n\t\tString nullableAnnotation = in.substring(split + 1);\n\t\treturn custom(verifyTypeName(nonNullAnnotation), verifyTypeName(nullableAnnotation), typeUse);\n\t}\n\t\n\tprivate static final String MSG = \"Not an identifier (provide a fully qualified type for custom: nullity annotations): \";\n\tprivate static String verifyTypeName(String fqn) {\n\t\tboolean atStart = true;\n\t\tfor (int i = 0; i < fqn.length(); i++) {\n\t\t\tchar c = fqn.charAt(i);","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/projectlombok/lombok/blob/6d6a3e9fec0a9555702561fbeb8eac836575116e/src/core/lombok/core/configuration/NullAnnotationLibrary.java#L107-L143","documentation":"NullAnnotationLibrary.valueOf resolves the 'lombok.copyableAnnotations'-style null annotation config key (checker-quality nullity annotations) to a library. Values not matching a built-in key and not starting with 'custom:' are rejected with a list of valid options.","triggerScenarios":"Setting the null-annotation config value to a misspelled or unsupported library name, wrong casing (the comparison uses a canonical lowercase 'ci'), or an empty/unknown string.","commonSituations":"Typing 'javax.validation' or 'JSR305' instead of a listed key; using an old key name removed from ALL_AVAILABLE; capitalization mismatches in lombok.config.","solutions":["Use one of the listed keys exactly: none, javax, jakarta, eclipse, jetbrains, netbeans, androidx, android.support, checkerframework, findbugs, spring, jml, jspecify.","For a non-bundled library, use the custom: syntax: CUSTOM:[TYPE_USE:]nonnull.annotation.type:nullable.annotation.type.","Check spelling and casing; keys are matched case-insensitively on the canonical form but must otherwise be exact."],"exampleFix":"// before (lombok.config)\nlombok.nullable.annotations = javax.validation\n// after\nlombok.nullable.annotations = javax","handlingStrategy":"validation","validationCode":"java.util.Set<String> VALID = java.util.Set.of(\"none\",\"javax\",\"jakarta\",\"eclipse\",\"jetbrains\",\"netbeans\",\"androidx\",\"android.support\",\"checkerframework\",\"findbugs\",\"spring\",\"jml\",\"jspecify\");\nboolean isValidNullAnnotationLibrary(String v) {\n  String lv = v.trim().toLowerCase();\n  return VALID.contains(lv) || lv.startsWith(\"custom:\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  NullAnnotationLibrary lib = NullAnnotationLibrary.valueOf(cfgValue);\n} catch (IllegalArgumentException e) {\n  // fall back to a built-in key such as \"javax\"\n}","preventionTips":["Use keys exactly from the documented list; avoid aliases like 'JSR305'.","Use CUSTOM:[TYPE_USE:]nonnull:nullable for anything not built in.","Validate lombok.config values in CI before builds."],"tags":["lombok","configuration","null-annotations"],"backgroundTag":"invalid-enum-value","analyzedSha":"6d6a3e9fec0a9555702561fbeb8eac836575116e","analyzedAt":"2026-09-07T23:18:01.841Z","contentChangedAt":"2026-09-07T23:18:01.841Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}