[
https://issues.apache.org/jira/browse/MNG-8530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17921650#comment-17921650
]
Guillaume Nodet commented on MNG-8530:
--------------------------------------
Do you think you could raise a PR for that please ?
> 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)