gnodet-bot commented on code in PR #13591:
URL: https://github.com/apache/maven/pull/13591#discussion_r4335314569
##########
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java:
##########
@@ -322,12 +323,25 @@ protected interface NoExceptionCloseable extends
AutoCloseable {
protected NoExceptionCloseable getProjectLock(MavenSession session,
MojoDescriptor mojoDescriptor) {
Review Comment:
โ **Compilation error introduced**: `MojoExecutorTest` (package
`o.a.m.lifecycle.internal.concurrent`) calls `executor.getProjectLock(...)` โ
where `executor` is a `concurrent.MojoExecutor` instance.
`concurrent.MojoExecutor` does not override `getProjectLock()`, so the
declaring class for protected-access purposes is the base `MojoExecutor` in
`o.a.m.lifecycle.internal`. `MojoExecutorTest` is in a different package and is
not a subclass โ JLS ยง6.6.1 denies access. Verified with javac 21.
Revert to `public` (this method is on an internal implementation class
already, not in any public API surface):
```suggestion
public NoExceptionCloseable getProjectLock(MavenSession session,
MojoDescriptor mojoDescriptor) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]