{"record":{"id":"363b843ef07ad220","repo":"pentaho/pentaho-kettle","slug":"invalid-hex-digit","errorCode":null,"errorMessage":"invalid hex digit ''.","messagePattern":"invalid hex digit ''\\.","errorType":"exception","errorClass":"KettleValueException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/compatibility/Value.java","lineNumber":3605,"sourceCode":"\n    // we assume a leading 0 if the length is not even.\n    if ( ( len % 2 ) == 1 ) {\n      evenByte = false;\n    }\n\n    int nibble;\n    int i, j;\n    for ( i = 0, j = 0; i < len; i++ ) {\n      char c = hexString.charAt( i );\n\n      if ( ( c >= '0' ) && ( c <= '9' ) ) {\n        nibble = c - '0';\n      } else if ( ( c >= 'A' ) && ( c <= 'F' ) ) {\n        nibble = c - 'A' + 0x0A;\n      } else if ( ( c >= 'a' ) && ( c <= 'f' ) ) {\n        nibble = c - 'a' + 0x0A;\n      } else {\n        throw new KettleValueException( \"invalid hex digit '\" + c + \"'.\" );\n      }\n\n      if ( evenByte ) {\n        nextByte = ( nibble << 4 );\n      } else {\n        nextByte += nibble;\n        chArray[j] = (char) nextByte;\n        j++;\n      }\n\n      evenByte = !evenByte;\n    }\n    setValue( new String( chArray ) );\n\n    return this;\n  }\n\n  /**","sourceCodeStart":3587,"sourceCodeEnd":3623,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/compatibility/Value.java#L3587-L3623","documentation":"Character-level validation while decoding a hex string to bytes in the legacy Value hexDecode(): a character outside 0-9, A-F and a-f was encountered, so it cannot be mapped to a nibble. The offending character is interpolated into the message; a leading zero is assumed for odd-length input.","triggerScenarios":"Thrown at core/src/main/java/org/pentaho/di/compatibility/Value.java:3605 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove or correct the non-hexadecimal character in the input string","Validate/sanitize the hex string (regex [0-9a-fA-F]*) before decoding"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}