{"record":{"id":"70ca1527e852fad0","repo":"apache/hadoop","slug":"no-enum-constant-canonicalname-configvalue","errorCode":null,"errorMessage":"No enum constant {canonicalName}.{configValue}","messagePattern":"No enum constant (.+?)\\.(.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java","lineNumber":1024,"sourceCode":"\n  /**\n   * Returns the account-specific enum value if it exists, then\n   * looks for an account-agnostic value in case-insensitive manner.\n   * @param name Account-agnostic configuration key\n   * @param defaultValue Value returned if none is configured\n   * @param <T> Enum type\n   * @return enum value if one exists, else null\n   */\n  public <T extends Enum<T>> T getCaseInsensitiveEnum(String name, T defaultValue) {\n    String configValue = getString(name, null);\n    if (configValue != null) {\n      for (T enumConstant : defaultValue.getDeclaringClass().getEnumConstants()) { // Step 3: Iterate over enum constants\n        if (enumConstant.name().equalsIgnoreCase(configValue)) {\n          return enumConstant;\n        }\n      }\n      // No match found\n      throw new IllegalArgumentException(\"No enum constant \" + defaultValue.getDeclaringClass().getCanonicalName() + \".\" + configValue);\n    }\n    return defaultValue;\n  }\n\n  /**\n   * Returns the account-agnostic enum value if it exists, else\n   * return default.\n   * @param name Account-agnostic configuration key\n   * @param defaultValue Value returned if none is configured\n   * @param <T> Enum type\n   * @return enum value if one exists, else null\n   */\n  public <T extends Enum<T>> T getAccountAgnosticEnum(String name, T defaultValue) {\n    return rawConfig.getEnum(name, defaultValue);\n  }\n\n  /**\n   * Unsets parameter in the underlying Configuration object.","sourceCodeStart":1006,"sourceCodeEnd":1042,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java#L1006-L1042","documentation":"Error \"No enum constant {canonicalName}.{configValue}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java:1024 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the configuration value to one of the valid enum constants for that option; check spelling and case."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}