public boolean isBranchProtected(@NotNull String branch) {
    // let "master" match only "master" and not "any-master-here" by default
    return Stream.of(getForcePushProhibitedPatterns(), getAdditionalProhibitedPatterns())
      .flatMap(Collection::stream)
      .anyMatch(pattern -> isMatchSafe(branch, pattern));
  }
public boolean isBranchProtected(@NotNull String branch)