Skip to content

Commit

Permalink
add logging for invalid links
Browse files Browse the repository at this point in the history
  • Loading branch information
kwin committed Oct 27, 2022
1 parent f97c516 commit 5f1418f
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -44,6 +44,8 @@
*/
public class JavadocLinkGenerator
{
private static final Logger LOG = LoggerFactory.getLogger( JavadocLinkGenerator.class );

/**
* Javadoc tool version ranges whose generated sites expose different link formats.
*
Expand Down Expand Up @@ -253,7 +255,12 @@ public static boolean isLinkValid( URI url, Path baseDirectory )
}
else
{
return Files.exists( baseDirectory.resolve( url.getPath() ) );
Path file = baseDirectory.resolve( url.getPath() );
boolean exists = Files.exists( file );
if ( !exists )
{
LOG.warn( "Could not find file given through '{}' in resolved path '{}'", url, file );
}
}
}
}

0 comments on commit 5f1418f

Please sign in to comment.