Skip to content

Commit

Permalink
FURNACE-127: fixed NPE when relativePath is empty (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
mareknovotny authored and gastaldi committed Nov 9, 2016
1 parent 26c96df commit 239d255
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,12 @@ private List<File> createFoundModules(final File pomFile)
{
Xpp3Dom relativePathNode = parent.getChild("relativePath");
String relativePath = (relativePathNode == null) ? "../pom.xml" : relativePathNode.getValue();
File parentPom = pomFile.getParentFile().toPath().resolve(relativePath).toFile();
if (parentPom.isFile())
result = createFoundModules(parentPom);
if (relativePath != null)
{
File parentPom = pomFile.getParentFile().toPath().resolve(relativePath).toFile();
if (parentPom.isFile())
result = createFoundModules(parentPom);
}
}
}

Expand Down

0 comments on commit 239d255

Please sign in to comment.