/** * Create a new author filter. * <p> * An optimized substring search may be automatically selected if the * pattern does not contain any regular expression meta-characters. * <p> * The search is performed using a case-insensitive comparison. The * character encoding of the commit message itself is not respected. The * filter matches on raw UTF-8 byte sequences. * * @param pattern * regular expression pattern to match. * @return a new filter that matches the given expression against the author * name and address of a commit. */ public static RevFilter create(String pattern) { if (pattern.length() == 0) throw new IllegalArgumentException(JGitText.get().cannotMatchOnEmptyString); if (SubStringRevFilter.safe(pattern)) return new SubStringSearch(pattern); return new PatternSearch(pattern); }
/** * Create a new author filter. * <p> * An optimized substring search may be automatically selected if the * pattern does not contain any regular expression meta-characters. * <p> * The search is performed using a case-insensitive comparison. The * character encoding of the commit message itself is not respected. The * filter matches on raw UTF-8 byte sequences. * * @param pattern * regular expression pattern to match. * @return a new filter that matches the given expression against the author * name and address of a commit. */ public static RevFilter create(String pattern) { if (pattern.length() == 0) throw new IllegalArgumentException(JGitText.get().cannotMatchOnEmptyString); if (SubStringRevFilter.safe(pattern)) return new SubStringSearch(pattern); return new PatternSearch(pattern); }
/** * Create a new author filter. * <p> * An optimized substring search may be automatically selected if the * pattern does not contain any regular expression meta-characters. * <p> * The search is performed using a case-insensitive comparison. The * character encoding of the commit message itself is not respected. The * filter matches on raw UTF-8 byte sequences. * * @param pattern * regular expression pattern to match. * @return a new filter that matches the given expression against the author * name and address of a commit. */ public static RevFilter create(String pattern) { if (pattern.length() == 0) throw new IllegalArgumentException(JGitText.get().cannotMatchOnEmptyString); if (SubStringRevFilter.safe(pattern)) return new SubStringSearch(pattern); return new PatternSearch(pattern); }
/** * Create a new author filter. * <p> * An optimized substring search may be automatically selected if the * pattern does not contain any regular expression meta-characters. * <p> * The search is performed using a case-insensitive comparison. The * character encoding of the commit message itself is not respected. The * filter matches on raw UTF-8 byte sequences. * * @param pattern * regular expression pattern to match. * @return a new filter that matches the given expression against the author * name and address of a commit. */ public static RevFilter create(String pattern) { if (pattern.length() == 0) throw new IllegalArgumentException(JGitText.get().cannotMatchOnEmptyString); if (SubStringRevFilter.safe(pattern)) return new SubStringSearch(pattern); return new PatternSearch(pattern); }