public static boolean isWhitelisted ( String name , Properties specificWhitelist , Map < String , List < Dependency > > dependencies ) { if ( specificWhitelist != null && specificWhitelist . containsKey ( name ) ) { return versionsMatch ( specificWhitelist . getProperty ( name ) , dependencies . keySet ( ) ) ; } // Otherwise try hardcoded rules: WhitelistRule rule = WHITELIST_RULES . get ( name ) ; return rule != null && rule . isWhitelisted ( dependencies ) ; }
Return true if this dependency and given set of versions is whitelisted .