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);
  }
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());
    }

    
    WhitelistRule rule = WHITELIST_RULES.get(name);
    return rule != null && rule.isWhitelisted(dependencies);
  }
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.

This class have several rules for whitelisting - some of them are harcoded (known whitelist for all libraries),
whereas the optional Properties argument allows specific exceptions for this particular classpath.

@param name Name of the dependency
@param specificWhitelist Properties file with exceptions
@param dependencies Version -> List of full dependencies
@return
Return true if this dependency and given set of versions is whitelisted .