{"record":{"id":"9e079911e5330d20","repo":"jwtk/jjwt","slug":"invalid-getname-param-value-rawvalue","errorCode":null,"errorMessage":"Invalid ${getName()} ${param} value: ${rawValue}. ${e.getMessage()}","messagePattern":"Invalid (.+?) (.+?) value: (.+?)\\. (.+?)","errorType":"validation","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"impl/src/main/java/io/jsonwebtoken/impl/ParameterMap.java","lineNumber":193,"sourceCode":"        try {\n            idiomaticValue = param.applyFrom(rawValue);\n            Assert.notNull(idiomaticValue, \"Parameter's resulting idiomaticValue cannot be null.\");\n            canonicalValue = param.applyTo(idiomaticValue);\n            Assert.notNull(canonicalValue, \"Parameter's resulting canonicalValue cannot be null.\");\n        } catch (Exception e) {\n            StringBuilder sb = new StringBuilder(100);\n            sb.append(\"Invalid \").append(getName()).append(\" \").append(param).append(\" value\");\n            if (param.isSecret()) {\n                sb.append(\": \").append(RedactedConfidentialValue.REDACTED_VALUE);\n            } else if (!(rawValue instanceof byte[])) {\n                // don't print raw byte array gibberish.  We can't base64[url] encode it either because that could\n                // make the exception message confusing: the developer would see an encoded string and could think\n                // that was the rawValue specified when it wasn't.\n                sb.append(\": \").append(Objects.nullSafeToString(rawValue));\n            }\n            sb.append(\". \").append(e.getMessage());\n            String msg = sb.toString();\n            throw new IllegalArgumentException(msg, e);\n        }\n        this.idiomaticValues.put(id, idiomaticValue);\n        return this.values.put(id, canonicalValue);\n    }\n\n    @Override\n    public Object remove(Object key) {\n        assertMutable();\n        this.idiomaticValues.remove(key);\n        return this.values.remove(key);\n    }\n\n    @Override\n    public void putAll(Map<? extends String, ?> m) {\n        if (m == null) {\n            return;\n        }\n        for (Map.Entry<? extends String, ?> entry : m.entrySet()) {","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/jwtk/jjwt/blob/fb71496164c71442d08adec4571d9616ed5e1b8d/impl/src/main/java/io/jsonwebtoken/impl/ParameterMap.java#L175-L211","documentation":"Generic validation guard in ParameterMap.apply: thrown when converting a raw (usually user/JSON-supplied) value into a typed JJWT parameter fails — param.applyFrom rejected the raw value, or the resulting idiomatic/canonical value was null. The message names the parameter map, the parameter, and the offending raw value (secret parameters are redacted).","triggerScenarios":"Thrown at impl/src/main/java/io/jsonwebtoken/impl/ParameterMap.java:193 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the embedded cause (e.getMessage()) to see which conversion failed (format, range, type) and correct the input value before passing it to the builder/put call","Ensure the value's type matches what the parameter expects (e.g. pass an Integer/Date/Key, not a String, where applicable)","If the value comes from external JSON/config, validate and normalize it (parse dates to java.util.Date, numbers to the expected type) before building the JWT/JWK"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb71496164c71442d08adec4571d9616ed5e1b8d","analyzedAt":"2026-09-09T00:33:09.982Z","contentChangedAt":"2026-09-09T00:33:09.982Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}