{"record":{"id":"acf55f93fd80723a","repo":"Netflix/Hystrix","slug":"bad-property-value-property-name-expected-i","errorCode":null,"errorMessage":"bad property value. property name '{}'. Expected int value, actual = {}","messagePattern":"bad property value\\. property name '(.+?)'\\. Expected int value, actual = (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/conf/HystrixPropertiesManager.java","lineNumber":415,"sourceCode":"    private interface PropSetter<S, V> {\n        void set(S setter, V value) throws IllegalArgumentException;\n    }\n\n    private static <E extends Enum<E>> E toEnum(String propName, String propValue, Class<E> enumType, E... values) throws IllegalArgumentException {\n        try {\n            return Enum.valueOf(enumType, propValue);\n        } catch (NullPointerException npe) {\n            throw createBadEnumError(propName, propValue, values);\n        } catch (IllegalArgumentException e) {\n            throw createBadEnumError(propName, propValue, values);\n        }\n    }\n\n    private static int toInt(String propName, String propValue) throws IllegalArgumentException {\n        try {\n            return Integer.parseInt(propValue);\n        } catch (NumberFormatException e) {\n            throw new IllegalArgumentException(\"bad property value. property name '\" + propName + \"'. Expected int value, actual = \" + propValue);\n        }\n    }\n\n    private static boolean toBoolean(String propValue) {\n        return Boolean.valueOf(propValue);\n    }\n\n    private static IllegalArgumentException createBadEnumError(String propName, String propValue, Enum... values) {\n        throw new IllegalArgumentException(\"bad property value. property name '\" + propName + \"'. Expected correct enum value, one of the [\" + Arrays.toString(values) + \"] , actual = \" + propValue);\n    }\n\n}\n","sourceCodeStart":397,"sourceCodeEnd":428,"githubUrl":"https://github.com/Netflix/Hystrix/blob/5ce3bc58c38e7ca60ef2fe0e516e390e294ad941/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/conf/HystrixPropertiesManager.java#L397-L428","documentation":"toInt() is the value-conversion helper used by HystrixPropertiesManager when a @HystrixProperty is bound to an int-typed setter (timeouts, window sizes, concurrency counts). If Integer.parseInt fails with NumberFormatException it rethrows IllegalArgumentException with the property name, the expected type, and the actual string so you can see exactly which value is malformed.","triggerScenarios":"@HystrixProperty(name = \"execution.isolation.thread.timeoutInMilliseconds\", value = \"1_000\"), value = \"\" (empty placeholder from external config), value = \"10ms\", or a locale-formatted number like \"1.000\".","commonSituations":"Values sourced from property files/environment where a placeholder was not resolved (literal '${timeout}'); trailing units or whitespace accidentally included; converting values from YAML that serialize with decimal points.","solutions":["Find the property by name in the message and its owning annotation","Change the value to a plain integer literal string without separators, units, or whitespace (e.g. \"1000\")","If the value comes from external config, verify the placeholder resolves at runtime (log it once at startup)","Add a startup assertion or test that parses all configured numeric values"],"exampleFix":"// before\n@HystrixProperty(name = \"execution.isolation.thread.timeoutInMilliseconds\", value = \"1_000\")\n\n// after\n@HystrixProperty(name = \"execution.isolation.thread.timeoutInMilliseconds\", value = \"1000\")","handlingStrategy":"validation","validationCode":"static String intProp(String name, String raw) {\n  if (raw == null || !raw.matches(\"\\\\d+\"))\n    throw new IllegalStateException(\"Property \" + name + \" must be a plain integer, got: \" + raw);\n  return raw;\n}\n// wrap externalized values before injecting: intProp(\"timeout\", config.get(\"hystrix.timeout\"))","typeGuard":null,"tryCatchPattern":"catch (IllegalArgumentException e) { log.error(\"{}\", e.getMessage()); /* message names property and bad value — fix config and restart */ }","preventionTips":["Resolve and log all externalized Hystrix values once at startup","Forbid underscore/units/locale formats in config values with a regex check","Unit-test config parsing before deploy"],"tags":["hystrix","javanica","configuration","number-parsing","validation"],"backgroundTag":null,"analyzedSha":"5ce3bc58c38e7ca60ef2fe0e516e390e294ad941","analyzedAt":"2026-08-14T10:55:35.600Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}