public boolean modified()

in common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/ExternalRepositoriesReloadableWebappLoader.java [131:168]


    public boolean modified()
    {
        boolean modified = super.modified();
        if ( !modified )
        {
            if ( log != null )
            {
                log.debug( "classPath scanning started at " + new Date().toString() );
            }
            for ( Map.Entry<String, Long> entry : modificationTimeMap.entrySet() )
            {
                String key = entry.getKey();
                File file = new File( key );
                if ( file.exists() )
                {
                    // file could be deleted.
                    Long savedLastModified = modificationTimeMap.get( key );
                    if ( file.lastModified() > savedLastModified )
                    {
                        modified = true;
                        modificationTimeMap.put( key, file.lastModified() );

                        // directory last modification time can change when some class,
                        // jar or subdirectory was added or deleted.
                        if ( file.isDirectory() )
                        {
                            addClassDirectory( file );
                        }
                    }
                }
            }
        }
        if ( log != null )
        {
            log.debug( "context " + modified + " at " + new Date().toString() );
        }
        return modified;
    }