apache/maven · error · RuntimeException

Mismatched parentheses: missing closing parenthesis in funct

Error message

Mismatched parentheses: missing closing parenthesis in function call

What it means

Error "Mismatched parentheses: missing closing parenthesis in function call" thrown in apache/maven.

Source

Thrown at impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionParser.java:385

    }

    /**
     * Parses a list of arguments for a function call.
     *
     * @return a list of parsed arguments
     * @throws RuntimeException if there's a mismatch in parentheses
     */
    private List<Object> parseArgumentList() {
        List<Object> args = new ArrayList<>();
        current++; // Skip the opening parenthesis
        while (current < tokens.size() && !tokens.get(current).equals(")")) {
            args.add(parseLogicalOr());
            if (current < tokens.size() && tokens.get(current).equals(",")) {
                current++;
            }
        }
        if (current >= tokens.size() || !tokens.get(current).equals(")")) {
            throw new RuntimeException("Mismatched parentheses: missing closing parenthesis in function call");
        }
        current++; // Skip the closing parenthesis
        return args;
    }

    /**
     * Parses a function call.
     *
     * @return the result of the function call
     */
    private Object parseFunction() {
        String functionName = tokens.get(current);
        current++;
        List<Object> args = parseArgumentList();
        return functions.get(functionName).apply(args);
    }

    /**

View on GitHub (pinned to e4093d4e12)

When it happens

Trigger: Thrown at impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionParser.java:385 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21). Data as JSON: /api/errors/d0a836d09d67c684. Report an issue: GitHub.