mirror of https://github.com/apache/maven.git
Fix possible NPE
This commit is contained in:
parent
bf6b0387a9
commit
45721a4c9b
|
@ -337,9 +337,9 @@ public class ExecutionEventLogger extends AbstractExecutionListener {
|
|||
File currentPom = project.getFile();
|
||||
if (currentPom != null) {
|
||||
MavenSession session = event.getSession();
|
||||
Path topDirectory = session.getTopDirectory();
|
||||
Path current = currentPom.toPath().toAbsolutePath().normalize();
|
||||
if (current.startsWith(topDirectory)) {
|
||||
Path topDirectory = session.getTopDirectory();
|
||||
if (topDirectory != null && current.startsWith(topDirectory)) {
|
||||
current = topDirectory.relativize(current);
|
||||
}
|
||||
logger.info(" from " + current);
|
||||
|
|
Loading…
Reference in New Issue