{"record":{"id":"668a05e7a0d9e051","repo":"oracle/graal","slug":"directed-inlining-rule-has-an-empty-componentname","errorCode":null,"errorMessage":"Directed inlining rule has an empty {componentName} filter or bci: {ruleSpec}","messagePattern":"Directed inlining rule has an empty (.+?) filter or bci: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/common/inlining/DirectedInliningRules.java","lineNumber":330,"sourceCode":"        }\n\n        ParsedCalleeSpec callee = parseCalleeSpec(calleeSpec, ruleSpec);\n\n        return new Rule(ruleSpec,\n                        callerFilters,\n                        callerBcis,\n                        new ComponentFilter(parseSinglePositiveMethodFilter(callee.methodSpec(), \"callee\", ruleSpec), callee.receiverTypes()));\n    }\n\n    private static ParsedMethodSpec parseMethodSpec(String methodSpec, String componentName, String ruleSpec) {\n        int bci = ANY_BCI;\n        int bciSeparator = findLastTopLevel(methodSpec, '@');\n        String parsedMethodSpec = methodSpec;\n        if (bciSeparator >= 0) {\n            String bciSpec = methodSpec.substring(bciSeparator + 1).trim();\n            parsedMethodSpec = methodSpec.substring(0, bciSeparator).trim();\n            if (parsedMethodSpec.isEmpty() || bciSpec.isEmpty()) {\n                throw new IllegalArgumentException(\"Directed inlining rule has an empty \" + componentName + \" filter or bci: \" + ruleSpec);\n            }\n            bci = Integer.parseInt(bciSpec);\n        }\n        return new ParsedMethodSpec(parsedMethodSpec, bci);\n    }\n\n    private static ParsedCalleeSpec parseCalleeSpec(String calleeSpec, String ruleSpec) {\n        int typeFilterStart = findTopLevel(calleeSpec, \"{\");\n        if (typeFilterStart < 0) {\n            if (findTopLevel(calleeSpec, \"}\") >= 0) {\n                throw invalidRule(ruleSpec);\n            }\n            return new ParsedCalleeSpec(calleeSpec, ReceiverTypeFilter.EMPTY_ARRAY);\n        }\n\n        int typeFilterEnd = findMatchingBrace(calleeSpec, typeFilterStart);\n        if (typeFilterEnd < 0) {\n            throw invalidRule(ruleSpec);","sourceCodeStart":312,"sourceCodeEnd":348,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/common/inlining/DirectedInliningRules.java#L312-L348","documentation":"parseMethodSpec (DirectedInliningRules.java:330) handles optional '@bci' suffixes on caller/callee specs to pin a rule to a specific invocation bytecode index. If either side of '@' is empty (e.g., 'A.m@' or '@42'), it throws this IllegalArgumentException naming which component was malformed.","triggerScenarios":"A rule component like 'com.foo.A.f@' (missing bci), '@17' (missing method filter), or 'com.foo.A.f @ ' where trimming yields an empty half.","commonSituations":"Hand-editing bcis into rules; removing a method name but leaving the bci; assuming '@' is a separator between caller and callee rather than a bci marker.","solutions":["Supply both halves: a method filter followed by an integer bci, e.g., 'com.foo.A.f@17'","Drop the '@bci' suffix entirely to match any bci","Remember '@' means 'at this bytecode index', not a path separator"],"exampleFix":"# before\ninline : com.foo.A.f@ -> com.bar.B.g\n\n# after\ninline : com.foo.A.f@17 -> com.bar.B.g","handlingStrategy":"validation","validationCode":"if (spec.indexOf('@') >= 0) {\n    String[] halves = spec.split(\"@\", -1);\n    assert halves.length == 2 && !halves[0].trim().isEmpty() && halves[1].trim().matches(\"\\\\d+\") : spec;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use '@<int>' only as a trailing bci suffix with a method filter before it","Omit '@' entirely when bci does not matter"],"tags":["graal","inlining","parsing","bci"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}