apache / apache/maven

[MNG-6982] PluginParameterExpressionEvaluator fails with NPE if created without MojoExecution

Open
#8,052 5 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Falko Modler](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=famod)** opened **[MNG-6982](https://issues.apache.org/jira/browse/MNG-6982?redirect=false)** and commented

This constructor of PluginParameterExpressionEvaluator is not requiring a MojoExecution parameter:
https://github.com/apache/maven/blob/78f605e377a6450828e8b3e516d132e6797603df/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java#L96-L99

But if created this way, the evaluator will fail with a NullPointerException while trying to get the MojoDescriptor here:
https://github.com/apache/maven/blob/78f605e377a6450828e8b3e516d132e6797603df/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java#L205

---

**Affects:** 3.6.3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.