{"record":{"id":"92e8f4c9b5181577","repo":"skylot/jadx","slug":"type-must-be-one-of-int-long-float-double-stri","errorCode":null,"errorMessage":"Type must be one of int, long, float, double, String or Object.","messagePattern":"Type must be one of int, long, float, double, String or Object\\.","errorType":"validation","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-gui/src/main/java/jadx/gui/device/debugger/DebugController.java","lineNumber":268,"sourceCode":"\tprotected static RuntimeType castType(String type) {\n\t\tRuntimeType rt = null;\n\t\tif (!StringUtils.isEmpty(type)) {\n\t\t\trt = TYPE_MAP.get(type);\n\t\t}\n\t\tif (rt == null) {\n\t\t\trt = POSSIBLE_TYPES[0];\n\t\t}\n\t\treturn rt;\n\t}\n\n\tprivate void checkType(ArgType type, Object value) {\n\t\tif (!(type == ArgType.INT && value instanceof Integer)\n\t\t\t\t&& !(type == ArgType.STRING && value instanceof String)\n\t\t\t\t&& !(type == ArgType.LONG && value instanceof Long)\n\t\t\t\t&& !(type == ArgType.FLOAT && value instanceof Float)\n\t\t\t\t&& !(type == ArgType.DOUBLE && value instanceof Double)\n\t\t\t\t&& !(type == ArgType.OBJECT && value instanceof Long)) {\n\t\t\tthrow new JadxRuntimeException(\"Type must be one of int, long, float, double, String or Object.\");\n\t\t}\n\t}\n\n\tprivate boolean modifyValueInternal(ValueTreeNode valNode, RuntimeType type, Object value) {\n\t\tif (valNode instanceof RegTreeNode) {\n\t\t\ttry {\n\t\t\t\tRegTreeNode regNode = (RegTreeNode) valNode;\n\t\t\t\tdebugger.setValueSync(\n\t\t\t\t\t\tregNode.getRuntimeRegNum(),\n\t\t\t\t\t\ttype,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tcur.frame.getThreadID(),\n\t\t\t\t\t\tcur.frame.getFrame().getID());\n\t\t\t\tlazyQueue.execute(() -> {\n\t\t\t\t\tsetRegsNotUpdated();\n\t\t\t\t\tupdateRegister((RegTreeNode) valNode, type, true);\n\t\t\t\t});\n\t\t\t} catch (SmaliDebuggerException e) {","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-gui/src/main/java/jadx/gui/device/debugger/DebugController.java#L250-L286","documentation":"Error \"Type must be one of int, long, float, double, String or Object.\" thrown in skylot/jadx.","triggerScenarios":"Thrown at jadx-gui/src/main/java/jadx/gui/device/debugger/DebugController.java:268 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate the user-supplied type string against the allowed set (int, long, float, double, String, Object) before creating the value, and surface the validation message in the UI.","Trim and case-normalize the type input to avoid rejecting valid types due to formatting."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}