{"record":{"id":"be5d7ce516500988","repo":"pinpoint-apm/pinpoint","slug":"unknown-checkercategory","errorCode":null,"errorMessage":"Unknown CheckerCategory : ","messagePattern":"Unknown CheckerCategory : ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"web/src/main/java/com/navercorp/pinpoint/web/alarm/CheckerCategory.java","lineNumber":70,"sourceCode":"    \r\n    JVM_CPU_USAGE_RATE(\"JVM CPU USAGE RATE\", DataCollectorCategory.JVM_CPU_USAGE_RATE),\r\n\r\n    SYSTEM_CPU_USAGE_RATE(\"SYSTEM CPU USAGE RATE\", DataCollectorCategory.SYSTEM_CPU_USAGE_RATE),\r\n\r\n    DATASOURCE_CONNECTION_USAGE_RATE(\"DATASOURCE CONNECTION USAGE RATE\", DataCollectorCategory.DATA_SOURCE_STAT),\r\n    DEADLOCK_OCCURRENCE(\"DEADLOCK OCCURRENCE\", DataCollectorCategory.AGENT_EVENT),\r\n    FILE_DESCRIPTOR_COUNT(\"FILE DESCRIPTOR COUNT\", DataCollectorCategory.FILE_DESCRIPTOR);\r\n\r\n    private static final CheckerCategory[] CHECKER_CATEGORIES = CheckerCategory.values();\r\n\r\n    \r\n    public static CheckerCategory getValue(String value) {\r\n        for (CheckerCategory category : CHECKER_CATEGORIES) {\r\n            if (category.getName().equalsIgnoreCase(value)) {\r\n                return category;\r\n            }\r\n        }\r\n        throw new IllegalArgumentException(\"Unknown CheckerCategory : \" + value);\r\n    }\r\n\r\n    public static List<String> getNames() {\r\n\r\n        final List<String> names = new ArrayList<>(CHECKER_CATEGORIES.length);\r\n        for (CheckerCategory category : CHECKER_CATEGORIES) {\r\n            names.add(category.getName());\r\n        }\r\n        \r\n        return names;\r\n    }\r\n\r\n    private final String name;\r\n    private final DataCollectorCategory dataCollectorCategory;\r\n\r\n    CheckerCategory(String name, DataCollectorCategory dataCollectorCategory) {\r\n        this.name = name;\r\n        this.dataCollectorCategory = dataCollectorCategory;\r","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/web/src/main/java/com/navercorp/pinpoint/web/alarm/CheckerCategory.java#L52-L88","documentation":"CheckerCategory.getValue performs a case-insensitive lookup of an alarm checker category by name over the CHECKER_CATEGORIES array. If no category name equals the given value, it throws IllegalArgumentException. This protects callers from resolving an unknown string into a CheckerCategory enum-like constant.","triggerScenarios":"Calling CheckerCategory.getValue with a string that is not one of the registered checker category names (typo, wrong case is tolerated, but e.g. 'HEAP_USAGE' vs 'HEAP_USAGE_RATE', or an empty/null string).","commonSituations":"Users typing an alarm rule checker name incorrectly in webhook/alarm configuration JSON, upgrading Pinpoint where a checker name was renamed, or building alarm rules programmatically from user input.","solutions":["Check the exact category name via CheckerCategory.getNames() and correct the input string","Validate user-supplied checker names against getNames() before calling getValue","If a category was removed/renamed in a Pinpoint upgrade, update alarm rule configs to the new name"],"exampleFix":"// before\nCheckerCategory category = CheckerCategory.getValue(\"HEAP_USEAGE\");\n// after\nList<String> valid = CheckerCategory.getNames();\nif (!valid.contains(checkerName)) { throw new IllegalArgumentException(checkerName + \" not in \" + valid); }\nCheckerCategory category = CheckerCategory.getValue(checkerName);","handlingStrategy":"validation","validationCode":"boolean isValidChecker(String name) {\n    return name != null && CheckerCategory.getNames().stream().anyMatch(n -> n.equalsIgnoreCase(name));\n}\n// call CheckerCategory.getValue only if isValidChecker(name)","typeGuard":"CheckerCategory tryGetChecker(String name) {\n    for (String n : CheckerCategory.getNames()) {\n        if (n.equalsIgnoreCase(name)) return CheckerCategory.getValue(n);\n    }\n    return null;\n}","tryCatchPattern":"try {\n    CheckerCategory c = CheckerCategory.getValue(name);\n} catch (IllegalArgumentException e) {\n    logger.warn(\"Invalid checker category: {}\", name);\n    // reject config or fall back to default category\n}","preventionTips":["Always derive checker names from CheckerCategory.getNames() rather than literals","Validate alarm rule configs at load time with a fail-fast schema check","Diff checker names across Pinpoint upgrades before migrating configs"],"tags":["alarm","illegal-argument","enum-lookup"],"backgroundTag":"invalid-enum-value","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}