File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/main/java/org/apache/maven/plugins/javadoc Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 145145import static org .apache .maven .plugins .javadoc .JavadocUtil .toRelative ;
146146
147147/**
148- * Base class with majority of Javadoc functionalities .
148+ * Base class with the majority of Javadoc functionality .
149149 *
150150 * @author <a href="mailto:[email protected] ">Brett Porter</a> 151151 * @author <a href="mailto:[email protected] ">Vincent Siveton</a> @@ -2177,12 +2177,15 @@ protected Collection<JavadocModule> getSourcePaths() throws MavenReportException
21772177 }
21782178
21792179 if (getJavadocDirectory () != null ) {
2180- String javadocDirRelative = PathUtils .toRelative (
2181- project .getBasedir (), getJavadocDirectory ().getAbsolutePath ());
2182- File javadocDir = new File (subProject .getBasedir (), javadocDirRelative );
2183- if (javadocDir .exists () && javadocDir .isDirectory ()) {
2180+ Path base = project .getBasedir ().toPath ();
2181+ Path relative = base .relativize (
2182+ getJavadocDirectory ().toPath ().toAbsolutePath ());
2183+ Path javadocDir = subProject .getBasedir ().toPath ().resolve (relative );
2184+ if (Files .isDirectory (javadocDir )) {
21842185 Collection <Path > l = JavadocUtil .pruneDirs (
2185- subProject , Collections .singletonList (javadocDir .getAbsolutePath ()));
2186+ subProject ,
2187+ Collections .singletonList (
2188+ javadocDir .toAbsolutePath ().toString ()));
21862189 additionalSourcePaths .addAll (l );
21872190 }
21882191 }
You can’t perform that action at this time.
0 commit comments