Skip to content

Commit fb99aa5

Browse files
committed
Use JDK 7 relativization instead of hand-rolled code
1 parent 10be81a commit fb99aa5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6012,8 +6012,10 @@ protected final JavadocOptions buildJavadocOptions() throws IOException {
60126012
options.setTags(toList(tags));
60136013

60146014
if (getProject() != null && getJavadocDirectory() != null) {
6015-
options.setJavadocResourcesDirectory(
6016-
toRelative(getProject().getBasedir(), getJavadocDirectory().getAbsolutePath()));
6015+
Path basedir = getProject().getBasedir().toPath().toAbsolutePath();
6016+
Path javadocDirectory = getJavadocDirectory().toPath().toAbsolutePath();
6017+
Path javadocResourcesDirectory = basedir.relativize(javadocDirectory);
6018+
options.setJavadocResourcesDirectory(javadocResourcesDirectory.toString());
60176019
}
60186020

60196021
File optionsFile = getJavadocOptionsFile();

0 commit comments

Comments
 (0)