code: private static boolean matchesNameOrWildcard(String pattern, String s) {
          return "*".equals(pattern) || Objects.equal(pattern, s);
      }
docs: Returns true if {@code pattern} equals either "*" or {@code s}. Pattern
  may be {@code null}.