private static long getOldestIndexDate(CmsObject cms) {

        final File path = new File(getSolrSpellcheckRfsPath());
        final File[] directories = path.listFiles(SPELLCHECKING_DIRECTORY_NAME_FILTER);

        // Initialize with the greatest value a long type can hold
        long oldestIndexDate = Long.MAX_VALUE;

        for (final File dir : directories) {
            long date = dir.lastModified();
            if (date < oldestIndexDate) {
                oldestIndexDate = date;
            }
        }

        // If no file(s) have been found oldestIndexDate is still holding
        // Long.MAX_VALUE. In that case return Long.MIN_VALUE to ensure
        // that no indexing operation takes place.
        if (Long.MAX_VALUE == oldestIndexDate) {
            LOG.warn("It appears that no spellcheck indices have been found in " + getSolrSpellcheckRfsPath() + ". ");
            return Long.MIN_VALUE;
        }

        return oldestIndexDate;
    }
private static long getOldestIndexDate ( CmsObject cms ) { final File path = new File ( getSolrSpellcheckRfsPath ( ) ) ; final File [ ] directories = path . listFiles ( SPELLCHECKING_DIRECTORY_NAME_FILTER ) ; long oldestIndexDate = Long . MAX_VALUE ; for ( final File dir : directories ) { long date = dir . lastModified ( ) ; if ( date < oldestIndexDate ) { oldestIndexDate = date ; } } if ( Long . MAX_VALUE == oldestIndexDate ) { LOG . warn ( "It appears that no spellcheck indices have been found in " + getSolrSpellcheckRfsPath ( ) + ". " ) ; return Long . MIN_VALUE ; } return oldestIndexDate ; }
Returns the timestamp of the index whose index-built operation lies the
furthest back in the past.<p>

@param cms the OpenCms instance.
@return timestamp as type long.