projectlombok/lombok · error · IllegalArgumentException
Minor version must be between 0 and 999
Error message
Minor version must be between 0 and 999
What it means
CheckerFrameworkVersion.valueOf() encodes the version as major*1000+minor and enforces minor <= 999 and total <= MAX_SUPPORTED. A parsed minor version above 999 throws IllegalArgumentException 'Minor version must be between 0 and 999', rejecting implausible version strings rather than silently mis-encoding them.
Solutions
- Correct the minor part to 0–999, e.g. '2.12' instead of '2.1234'.
- If the intent was a real Checker Framework version, use its actual major.minor (patch is dropped).
- Also verify the total v = major*1000+minor does not exceed MAX_SUPPORTED, or the follow-up 'reduce the value' error will fire.
- Validate the value before writing it into lombok.config or before calling CheckerFrameworkVersion.valueOf programmatically.
Example fix
// before (lombok.config) checkerframework = 2.1234 // after checkerframework = 2.12
Defensive patterns
Strategy: validation
Validate before calling
java.util.regex.Matcher m = java.util.regex.Pattern.compile("^(\\d+)(?:\\.(\\d+))?$").matcher(s.trim());
if (!m.matches()) throw new IllegalArgumentException("not a major[.minor] version");
int minor = m.group(2) == null ? 0 : Integer.parseInt(m.group(2));
if (minor > 999) throw new IllegalArgumentException("minor must be 0-999"); Type guard
function isValidCheckerVersion(s) { const m = /^\d+(?:\.(\d{1,3}))?$/.exec(s.trim()); return m != null; } Try / catch
try { CheckerFrameworkVersion cv = CheckerFrameworkVersion.valueOf(s); } catch (IllegalArgumentException e) { log.error("Invalid checkerframework version: " + s); } Prevention
- Keep the minor segment to at most 3 digits.
- Parse versions programmatically rather than hand-editing config numbers.
- Double-check pasted version strings for duplicated digits.
- Remember the major*1000+minor encoding caps the minor at 999.
When it happens
Trigger: A 'checkerframework' lombok.config value matching VERSION but with a minor group larger than 999 (e.g. '2.1234') — after regex match, Integer.parseInt(m.group(2)) > 999.
Common situations: Paste errors that concatenate digits (e.g. '2.90' typo'd as '2.9001'); writing a date or build number instead of a version; misunderstanding the field as allowing arbitrary numeric identifiers.
Related errors
- Lombok supports at most v
- Invalid value
- Invalid identifier
- The declaration must follow the pattern: [LoggerType…
- There is more than one parameter definition that includes…
AI-assisted analysis of projectlombok/lombok@6d6a3e9fec (2026-09-07).
Data as JSON: /api/errors/4b71aba5a3697736.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/lombok/core/configuration/CheckerFrameworkVersion.java:74
}
public boolean generateReturnsReceiver() {
return version >= 3100;
}
public boolean generateCalledMethods() {
return version >= 3100;
}
public static CheckerFrameworkVersion valueOf(String versionString) {
if (versionString != null) versionString = versionString.trim();
if (versionString == null || versionString.equalsIgnoreCase("false") || versionString.equals("0")) return new CheckerFrameworkVersion(0);
if (versionString.equalsIgnoreCase("true")) return new CheckerFrameworkVersion(DEFAULT);
Matcher m = VERSION.matcher(versionString);
if (!m.matches()) throw new IllegalArgumentException("Expected 'true' or 'false' or a major/minor version, such as '2.9'");
int major = Integer.parseInt(m.group(1));
int minor = (m.group(2) != null && !m.group(2).isEmpty()) ? Integer.parseInt(m.group(2)) : 0;
if (minor > 999) throw new IllegalArgumentException("Minor version must be between 0 and 999");
int v = major * 1000 + minor;
if (v > MAX_SUPPORTED) {
String s = (v / 1000) + "." + (v % 1000);
throw new IllegalArgumentException("Lombok supports at most v" + s + "; reduce the value of key 'checkerframework' to " + s);
}
return new CheckerFrameworkVersion(v);
}
public static String description() {
return "checkerframework-version";
}
public static String exampleValue() {
String s = (MAX_SUPPORTED / 1000) + "." + (MAX_SUPPORTED % 1000);
return "major.minor (example: 3.2 - and no higher than " + s + ") or true or false";
}
@Override public boolean equals(Object obj) {View on GitHub (pinned to 6d6a3e9fec)