{"id":"56053c2145bb25a8","repo":"spring-projects/spring-boot","slug":"value-value-must-be-in-the-form-os-archit","errorCode":null,"errorMessage":"'value' [${value}] must be in the form 'os[/architecture[/variant]]'","messagePattern":"'value' \\[(.+?)\\] must be in the form 'os\\[/architecture\\[/variant\\]\\]'","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ImagePlatform.java","lineNumber":93,"sourceCode":"\t\t\tbuilder.append(\"/\").append(this.variant);\n\t\t}\n\t\treturn builder.toString();\n\t}\n\n\t/**\n\t * Create a new {@link ImagePlatform} from the given value in the form\n\t * {@code os[/architecture[/variant]]}.\n\t * @param value the value to parse\n\t * @return an {@link ImagePlatform} instance\n\t */\n\tpublic static ImagePlatform of(String value) {\n\t\tAssert.hasText(value, \"'value' must not be empty\");\n\t\tString[] split = value.split(\"/+\");\n\t\treturn switch (split.length) {\n\t\t\tcase 1 -> new ImagePlatform(split[0], null, null);\n\t\t\tcase 2 -> new ImagePlatform(split[0], split[1], null);\n\t\t\tcase 3 -> new ImagePlatform(split[0], split[1], split[2]);\n\t\t\tdefault -> throw new IllegalArgumentException(\n\t\t\t\t\t\"'value' [\" + value + \"] must be in the form 'os[/architecture[/variant]]'\");\n\t\t};\n\t}\n\n\t/**\n\t * Create a new {@link ImagePlatform} matching the platform information from the\n\t * provided {@link Image}.\n\t * @param image the image to get platform information from\n\t * @return an {@link ImagePlatform} instance\n\t */\n\tpublic static ImagePlatform from(Image image) {\n\t\treturn new ImagePlatform(image.getOs(), image.getArchitecture(), image.getVariant());\n\t}\n\n\t/**\n\t * Return a JSON-encoded representation of this platform.\n\t * @return the JSON string\n\t */","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/spring-projects/spring-boot/blob/5b2dbdbb8be64415eb6552f81ff7c449c8d251e6/buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ImagePlatform.java#L75-L111","documentation":"Error \"'value' [${value}] must be in the form 'os[/architecture[/variant]]'\" thrown in spring-projects/spring-boot.","triggerScenarios":"Thrown at buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ImagePlatform.java:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"5b2dbdbb8be64415eb6552f81ff7c449c8d251e6","analyzedAt":"2026-08-04T18:53:14.967Z","schemaVersion":2}