logback-android/src/main/java/ch/qos/logback/core/net/ssl/SSLParametersConfiguration.java
private String[] includedStrings(String[] defaults, String included,
      String excluded) {
    List<String> values = new ArrayList<String>(defaults.length);
    values.addAll(Arrays.asList(defaults));
    if (included != null) {
      StringCollectionUtil.retainMatching(values, stringToArray(included));
    }
    if (excluded != null) {
      StringCollectionUtil.removeMatching(values, stringToArray(excluded));
    }
    return values.toArray(new String[values.size()]);
  }
private String[] includedStrings(String[] defaults, String included,
      String excluded) {
    List<String> values = new ArrayList<String>(defaults.length);
    values.addAll(Arrays.asList(defaults));
    if (included != null) {
      StringCollectionUtil.retainMatching(values, stringToArray(included));
    }
    if (excluded != null) {
      StringCollectionUtil.removeMatching(values, stringToArray(excluded));
    }
    return values.toArray(new String[values.size()]);
  }
Applies include and exclude patterns to an array of default string values
to produce an array of strings included by the patterns.
@param defaults default list of string values
@param included comma-separated patterns that identity values to include
@param excluded comma-separated patterns that identity string to exclude
@return an array of strings containing those strings from {@code defaults}
that match at least one pattern in {@code included} that are not
matched by any pattern in {@code excluded}