{"record":{"id":"f3b4c5c1f1e591af","repo":"projectlombok/lombok","slug":"not-an-identifier-provide-a-fully-qualified-type","errorCode":null,"errorMessage":"Not an identifier (provide a fully qualified type for custom: nullity annotations): ","messagePattern":"Not an identifier \\(provide a fully qualified type for custom: nullity annotations\\): ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/core/lombok/core/configuration/NullAnnotationLibrary.java","lineNumber":148,"sourceCode":"\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);\n\t\t\tif (Character.isJavaIdentifierStart(c)) {\n\t\t\t\tatStart = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (atStart) throw new IllegalArgumentException(MSG + fqn);\n\t\t\tif (c == '.') {\n\t\t\t\tatStart = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (Character.isJavaIdentifierPart(c)) continue;\n\t\t\tthrow new IllegalArgumentException(MSG + fqn);\n\t\t}\n\t\tif (atStart) throw new IllegalArgumentException(MSG + fqn);\n\t\treturn fqn;\n\t}\n\t\n\t@Override public String toString() {\n\t\treturn key;\n\t}\n}\n","sourceCodeStart":130,"sourceCodeEnd":164,"githubUrl":"https://github.com/projectlombok/lombok/blob/6d6a3e9fec0a9555702561fbeb8eac836575116e/src/core/lombok/core/configuration/NullAnnotationLibrary.java#L130-L164","documentation":"When a CUSTOM: null annotation library is parsed, verifyTypeName checks that each annotation type name is a valid dotted fully-qualified Java type. A name whose first character is not a valid Java identifier start throws this IllegalArgumentException.","triggerScenarios":"valueOf('CUSTOM:...') where the non-null or nullable annotation type begins with an invalid character (digit, '.', symbol) or is empty at that position — detected at the identifier-start check (atStart still true when a non-start char is found).","commonSituations":"Writing 'CUSTOM:.util.Nullable', 'CUSTOM:1Nullable:Nullable', or leaving the segment empty due to a misplaced colon in the custom: syntax.","solutions":["Provide fully qualified type names with valid Java identifiers, e.g. CUSTOM:my.pkg.NonNull:my.pkg.Nullable.","Remove leading dots, digits, or symbols from the type segments.","Verify colon placement: CUSTOM:[TYPE_USE:]nonnull:nullable — no empty segments."],"exampleFix":"// before\nlombok.nullable.annotations = CUSTOM:.checkers.nullness.qual.Nullable\n// after\nlombok.nullable.annotations = CUSTOM:org.checkerframework.checker.nullness.qual.NonNull:org.checkerframework.checker.nullness.qual.Nullable","handlingStrategy":"validation","validationCode":"boolean isValidFqnSegment(String fqn) {\n  if (fqn == null || fqn.isEmpty()) return false;\n  for (String part : fqn.split(\"\\\\.\")) {\n    if (part.isEmpty() || !Character.isJavaIdentifierStart(part.charAt(0))) return false;\n    for (char c : part.substring(1).toCharArray()) if (!Character.isJavaIdentifierPart(c)) return false;\n  }\n  return true;\n}","typeGuard":null,"tryCatchPattern":"try {\n  NullAnnotationLibrary lib = NullAnnotationLibrary.valueOf(\"CUSTOM:\" + nonNull + \":\" + nullable);\n} catch (IllegalArgumentException e) {\n  // correct the type names before retrying\n}","preventionTips":["Ensure each CUSTOM: segment is a full dotted type name starting with a letter/underscore/$.","No empty segments between colons.","Preview the fully qualified annotation class names from your classpath."],"tags":["lombok","configuration","null-annotations","identifier"],"backgroundTag":"invalid-identifier","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"}