{"record":{"id":"61c0796ef446d57a","repo":"apache/shardingsphere","slug":"value-s-of-s-cannot-convert-to-type-s","errorCode":null,"errorMessage":"Value `%s` of `%s` cannot convert to type `%s`","messagePattern":"Value `(.+?)` of `(.+?)` cannot convert to type `(.+?)`","errorType":"validation","errorClass":"TypedPropertyValueException","httpStatus":null,"severity":"error","filePath":"infra/common/src/main/java/org/apache/shardingsphere/infra/props/TypedPropertyValue.java","lineNumber":46,"sourceCode":" */\n@Getter\npublic final class TypedPropertyValue {\n    \n    private final Object value;\n    \n    public TypedPropertyValue(final TypedPropertyKey key, final String value) throws TypedPropertyValueException {\n        this.value = createTypedValue(key, value);\n    }\n    \n    private Object createTypedValue(final TypedPropertyKey key, final String value) throws TypedPropertyValueException {\n        if (boolean.class == key.getType() || Boolean.class == key.getType()) {\n            return Boolean.valueOf(value);\n        }\n        if (int.class == key.getType() || Integer.class == key.getType()) {\n            try {\n                return Integer.valueOf(value);\n            } catch (final NumberFormatException ignored) {\n                throw new TypedPropertyValueException(key, value);\n            }\n        }\n        if (long.class == key.getType() || Long.class == key.getType()) {\n            try {\n                return Long.valueOf(value);\n            } catch (final NumberFormatException ignored) {\n                throw new TypedPropertyValueException(key, value);\n            }\n        }\n        if (float.class == key.getType() || Float.class == key.getType()) {\n            try {\n                return Float.valueOf(value);\n            } catch (final NumberFormatException ignored) {\n                throw new TypedPropertyValueException(key, value);\n            }\n        }\n        if (double.class == key.getType() || Double.class == key.getType()) {\n            try {","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/infra/common/src/main/java/org/apache/shardingsphere/infra/props/TypedPropertyValue.java#L28-L64","documentation":"Error \"Value `%s` of `%s` cannot convert to type `%s`\" thrown in apache/shardingsphere.","triggerScenarios":"A ShardingSphere property value cannot be converted to the typed value declared for its key in TypedPropertyValue.","commonSituations":"Non-numeric text given for an integer property, or an unrecognized literal for a boolean property in the configuration.","solutions":["Check the property key's expected type and provide a value of that type.","Remove surrounding whitespace or quotes that prevent the value from being parsed.","Consult the documentation for the valid value range or format of the property."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}