kwin opened a new issue, #503:
URL: https://github.com/apache/maven-build-cache-extension/issues/503
### Affected version
1.2.2
### Bug description
When a project with maven-build-cache-extension enabled within m2e I run
into the following NPE:
```
java.lang.NullPointerException: Cannot invoke "java.io.File.toPath()"
because the return value of
"org.apache.maven.execution.MavenExecutionRequest.getMultiModuleProjectDirectory()"
is null
at
org.apache.maven.buildcache.CacheUtils.getMultimoduleRoot(CacheUtils.java:106)
at
org.apache.maven.buildcache.xml.CacheConfigImpl.initialize(CacheConfigImpl.java:160)
at
org.apache.maven.buildcache.RemoteCacheRepositoryProvider.<init>(RemoteCacheRepositoryProvider.java:46)
```
Although from the javadoc it is not clear if `null` must be expected as
return value from
[`MavenExecutionRequest.getMultiModuleProjectDirectory()`](https://maven.apache.org/ref/3.9.15/maven-core/apidocs/org/apache/maven/execution/MavenExecutionRequest.html#getMultiModuleProjectDirectory())
there should be no unconditional dereferencing in
https://github.com/apache/maven-build-cache-extension/blob/8b89d01c97b5d2b69e2fd06d8f4ddc33eb6d1fd5/src/main/java/org/apache/maven/buildcache/CacheUtils.java#L115
--
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]