You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stefan Oehme (Jira)" <ji...@apache.org> on 2025/01/20 15:49:00 UTC

[jira] [Updated] (MNG-8530) Maven 4 prompter broken

     [ https://issues.apache.org/jira/browse/MNG-8530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Oehme updated MNG-8530:
------------------------------
    Affects Version/s: 4.0.0-rc-3
                           (was: 4.0.0-rc-2)

> Maven 4 prompter broken
> -----------------------
>
>                 Key: MNG-8530
>                 URL: https://issues.apache.org/jira/browse/MNG-8530
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 4.0.0-rc-3
>            Reporter: Stefan Oehme
>            Priority: Major
>
> The [new prompter|https://github.com/apache/maven/blob/master/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPrompter.java#L50] implementation reflectively calls the old one and always uses the same method no matter what overload was called:
> {code:java}
> clazz.getMethod("prompt", String.class, List.class, String.class); {code}
>  
> This is incorrect and leads to nullpointers when calling the new prompter with just a `message`, but no `possibleValues`.
> The new prompter should delegate to the correct overload of the old prompter instead of redirecting all calls to the same method. Also, the nullability annnotations are wrong. The message is never nullable. And if an overload with `possibleValues` is called, they must not be null.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)