webanno-support/src/main/java/de/tudarmstadt/ukp/clarin/webanno/support/sass/SassCacheManager.java
private Time findLastModified(SassSource source, Time time)
    {
        Time max = time;
        try {
            Time lastModified = Connections.getLastModified(source.getURL());
            max = Time.maxNullSafe(time, lastModified);

            Collection<SassSource> importedSources = source.getImportedSources();
            if (importedSources != null) {

                SassSource[] importedSourcesArray = importedSources.toArray(new SassSource[0]);
                int size = importedSourcesArray.length;

                for (int i = 0; i < size; i++) {
                    max = findLastModified(importedSourcesArray[i], max);
                }
            }
        }
        catch (IOException iox) {
            LOG.warn("Cannot read the last modification time of a resource "
                    + source.getURL().toExternalForm(), iox);
        }
        return max;
    }
/**
     * Calculates the soonest time when a LessSource or any of its imported resources has been
     * modified
     *
     * @param source
     *            The LessSource which time to check
     * @param time
     *            The last modification time of the parent resource
     * @return The latest modified time of the root LessSource and its imported resources
     */
Calculates the soonest time when a LessSource or any of its imported resources has been
modified

@param source
The LessSource which time to check
@param time
The last modification time of the parent resource
@return The latest modified time of the root LessSource and its imported resources
Calculates the soonest time when a LessSource or any of its imported resources has been modified @param source The LessSource which time to check @param time The last modification time of the parent resource @return The latest modified time of the root LessSource and its imported resources
private Time findLastModified(SassSource source, Time time)
    {
        Time max = time;
        try {
            Time lastModified = Connections.getLastModified(source.getURL());
            max = Time.maxNullSafe(time, lastModified);
            Collection<SassSource> importedSources = source.getImportedSources();
            if (importedSources != null) {
                SassSource[] importedSourcesArray = importedSources.toArray(new SassSource[0]);
                int size = importedSourcesArray.length;
                for (int i = 0; i < size; i++) {
                    max = findLastModified(importedSourcesArray[i], max);
                }
            }
        }
        catch (IOException iox) {
            LOG.warn("Cannot read the last modification time of a resource "
                    + source.getURL().toExternalForm(), iox);
        }
        return max;
    }
private Time findLastModified ( SassSource source , Time time ) { Time max = time ; try { Time lastModified = Connections . getLastModified ( source . getURL ( ) ) ; max = Time . maxNullSafe ( time , lastModified ) ; Collection < SassSource > importedSources = source . getImportedSources ( ) ; if ( importedSources != null ) { SassSource [ ] importedSourcesArray = importedSources . toArray ( new SassSource [ 0 ] ) ; int size = importedSourcesArray . length ; for ( int i = 0 ; i < size ; i ++ ) { max = findLastModified ( importedSourcesArray [ i ] , max ) ; } } } catch ( IOException iox ) { LOG . warn ( "Cannot read the last modification time of a resource " + source . getURL ( ) . toExternalForm ( ) , iox ) ; } return max ; }
Calculates the soonest time when a LessSource or any of its imported resources has been
 modified
Calculates the soonest time when a LessSource or any of its imported resources has been modified