public static List < ClasspathResource > findResourcesWithDuplicates ( List < ClasspathResource > resourceFiles , boolean excludeSameSizeDups ) { List < ClasspathResource > resourcesWithDuplicates = new ArrayList <> ( ) ; // keep only entries with duplicates for ( ClasspathResource resource : resourceFiles ) { if ( resource . hasDuplicates ( excludeSameSizeDups ) ) { resourcesWithDuplicates . add ( resource ) ; } } return resourcesWithDuplicates ; }
Inspects a given list of classpath resources and returns only the resources that contain multiple versions .