{"record":{"id":"0a9dad5a69683c49","repo":"oracle/graal","slug":"unknown-tier-option-value-s-s","errorCode":null,"errorMessage":"Unknown tier option value '%s'. %s","messagePattern":"Unknown tier option value '(.+?)'\\. (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/truffle/TruffleCompilerOptions.java","lineNumber":72,"sourceCode":"    }\n\n    @Override\n    public String getNamePrefix() {\n        return \"compiler.\";\n    }\n\n    //@formatter:off\n\n    public enum CompilationTier {\n        lowTier,\n        peTier,\n        truffleTier;\n\n        static CompilationTier parse(String name) {\n            try {\n                return CompilationTier.valueOf(name);\n            } catch (IllegalArgumentException e) {\n                throw new IllegalArgumentException(String.format(\"Unknown tier option value '%s'. %s\", name, EXPANSION_VALUES));\n            }\n        }\n    }\n    public record PerformanceWarnings(Set<PerformanceWarningKind> kinds) {\n\n        public static PerformanceWarnings defaultValue() {\n            return new PerformanceWarnings(Set.of());\n        }\n\n        public static PerformanceWarnings parse(String value) {\n            return new PerformanceWarnings(parseImpl(value));\n        }\n\n        private static Set<PerformanceWarningKind> parseImpl(String value) {\n            if (\"none\".equals(value)) {\n                return EnumSet.noneOf(PerformanceWarningKind.class);\n            } else if (\"all\".equals(value)) {\n                Set<PerformanceWarningKind> result = EnumSet.allOf(PerformanceWarningKind.class);","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/truffle/TruffleCompilerOptions.java#L54-L90","documentation":"CompilationTier.parse converts an option string into the CompilationTier enum (lowTier, peTier, truffleTier) via valueOf; any other string raises IllegalArgumentException with 'Unknown tier option value' and the accepted values listed in EXPANSION_VALUES.","triggerScenarios":"Setting a tier option (e.g. a truffle compilation-tier spec) to a string that isn't exactly one of the enum constants — wrong case, old name, or invented value.","commonSituations":"Carrying tier names over from a different GraalVM release where the enum changed; case mistakes ('LowTier'); copy-paste from outdated docs.","solutions":["Use one of the exact enum names: lowTier, peTier, or truffleTier (case-sensitive).","Check EXPANSION_VALUES in the error message for the authoritative list of this release.","Validate tier strings against the enum before passing them in (see validation snippet)."],"exampleFix":"// before\noptions.put(\"graal.TruffleCompilationTier\", \"low-tier\"); // invalid: hyphen and case\n\n// after\noptions.put(\"graal.TruffleCompilationTier\", \"lowTier\");","handlingStrategy":"validation","validationCode":"static boolean isValidTier(String name) {\n    return java.util.Set.of(\"lowTier\", \"peTier\", \"truffleTier\").contains(name);\n}\nif (!isValidTier(tier)) {\n    throw new IllegalArgumentException(\"Unknown tier '\" + tier + \"'; use lowTier, peTier or truffleTier\");\n}","typeGuard":"// Narrow an untrusted string to a CompilationTier before use\nstatic java.util.Optional<CompilationTier> asTier(String s) {\n    try {\n        return java.util.Optional.of(CompilationTier.valueOf(s));\n    } catch (IllegalArgumentException e) {\n        return java.util.Optional.empty();\n    }\n}","tryCatchPattern":null,"preventionTips":["Resolve tier strings with Enum.valueOf and handle the failure at the config boundary, not inside compilation.","Treat the enum's constant list as the single source of truth; regenerate any docs/defaults from it."],"tags":["graal","truffle","options","enum","tier"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}