{"record":{"id":"c1db060a40190ad2","repo":"oracle/graal","slug":"invalid-directed-inlining-rules-file-path-path","errorCode":null,"errorMessage":"Invalid directed inlining rules file path: {path}","messagePattern":"Invalid directed inlining rules file path: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/common/inlining/DirectedInliningRules.java","lineNumber":223,"sourceCode":"        }\n\n        for (String ruleSpec : splitTopLevel(optionValue, DIRECTIVE_SEPARATOR)) {\n            String trimmedRule = ruleSpec.trim();\n            if (!trimmedRule.isEmpty()) {\n                rules.add(parseRule(trimmedRule));\n            }\n        }\n    }\n\n    private static void parseCommandFile(String commandFileOptionValue, ArrayList<Rule> inlineRules, ArrayList<Rule> dontInlineRules) {\n        if (commandFileOptionValue == null || commandFileOptionValue.trim().isEmpty()) {\n            return;\n        }\n        Path commandFile;\n        try {\n            commandFile = Path.of(commandFileOptionValue.trim());\n        } catch (InvalidPathException e) {\n            throw new IllegalArgumentException(\"Invalid directed inlining rules file path: \" + commandFileOptionValue, e);\n        }\n        List<String> lines;\n        try {\n            lines = Files.readAllLines(commandFile, StandardCharsets.UTF_8);\n        } catch (IOException e) {\n            throw new IllegalArgumentException(\"Could not read directed inlining rules file: \" + commandFile, e);\n        }\n        for (int i = 0; i < lines.size(); i++) {\n            parseCommandFileLine(commandFile, i + 1, lines.get(i), inlineRules, dontInlineRules);\n        }\n    }\n\n    private static void parseCommandFileLine(Path commandFile, int lineNumber, String line, ArrayList<Rule> inlineRules, ArrayList<Rule> dontInlineRules) {\n        String commandLine = stripComment(line).trim();\n        if (commandLine.isEmpty()) {\n            return;\n        }\n        int commandSeparator = findCommandSeparator(commandLine);","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/common/inlining/DirectedInliningRules.java#L205-L241","documentation":"DirectedInliningRules.parseCommandFile (DirectedInliningRules.java:223) converts the directed-inlining rules file option value into a java.nio Path. If Path.of() throws InvalidPathException, the option value is not a valid path on this platform and an IllegalArgumentException wraps it.","triggerScenarios":"Setting the directed inlining command-file option (e.g., -Dgraal.DirectedInliningCommandFile=<value>) to a string containing illegal path characters (NUL byte, invalid characters on the OS) or a malformed path.","commonSituations":"Shell quoting mistakes that leave stray quotes/spaces in the flag; copying a Windows-style path onto Linux or vice versa; a template variable expanding to garbage.","solutions":["Print and inspect the exact option value actually passed to the JVM; fix quoting/escaping in the launcher script","Use a plain relative or absolute path with no special characters and verify it resolves from the JVM's working directory","Test the path with Path.of(...) in a scratch program if unsure which character is invalid"],"exampleFix":"# before\njava -Dgraal.DirectedInliningCommandFile=\"rules.txt\"\" App\n\n# after\njava -Dgraal.DirectedInliningCommandFile=rules.txt App","handlingStrategy":"validation","validationCode":"try {\n    Path.of(rulesPath.trim());\n} catch (InvalidPathException e) {\n    throw new IllegalArgumentException(\"fix the directed-inlining path: \" + rulesPath, e);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use simple absolute paths for option-supplied files","Echo the resolved flag value from launch scripts to catch quoting bugs"],"tags":["graal","inlining","options","filesystem","configuration"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}