}
if ( LOG.isDebugEnabled() )
{
displayMemoryConsumption();
}
LinkValidatorManager validator = getLinkValidatorManager();
filesToCheck = new LinkedList();
validator.loadCache( cache );
List files = new LinkedList();
LOG.debug( "Locating all files to be checked..." );
findFiles( files, basedir );
LOG.debug( "Located all files to be checked." );
LOG.info( "Found " + files.size() + " files to check." );
displayMemoryConsumption();
LOG.info( "Begin to check links in files..." );
Iterator fileIter = files.iterator();
FileToCheck flc;
while ( fileIter.hasNext() )
{
flc = (FileToCheck) fileIter.next();
try
{
filesToCheck.add( flc );
flc.check( validator );
}
catch ( Exception e )
{
LOG.error( "Error while checking : " + flc.getName(), e );
}
}
flc = null;
LOG.info( "Links checked." );
displayMemoryConsumption();
createDocument( files );
validator.saveCache( cache );
displayMemoryConsumption();
}