maven-compiler-plugin icon indicating copy to clipboard operation
maven-compiler-plugin copied to clipboard

[MCOMPILER-603] NullPointerException when using --patch-module compiler argument in tests

Open jira-importer opened this issue 1 year ago • 0 comments

Artem K. opened MCOMPILER-603 and commented

Summary

When using --patch-module compiler argument, there is a NullPointerException due to field pathElements not being initialized in {}TestCompilerMojo{}.

Description

This bug is a follow-up to MCOMPILER-510 I reported last year. The problem description and the cause is exactly the same. I left the comment in that ticket which I think was missed. The fix for MCOMPILER-510 was applied on CompilerMojo but not on TestCompilerMojo. So while the compilation now works on main code, the same NullPointerException happens when compiling test code.

Proof-of-concept

Attached is the an updated POC from my original ticket. When executing mvn verify, the NullPointerException occurs.


Affects: 3.13.0

Attachments:

jira-importer avatar Oct 21 '24 17:10 jira-importer