Florian Koeberle <florianskarten@xxxxxx> wrote: > +/** > + * Represents a pattern like "documents/*.txt" which matches all *.txt files in > + * the tree documents. > + * > + */ > +class TreeFilePattern implements FilePattern { > + > + private final List<String> path; > + > + private final int offset; > + > + private final GlobalFilePattern globalFilePattern; Hmm. This looks a lot like the ComplexFilePattern class to me; only it has the optimization of avoiding the regex match on the leading parts of the path. Wouldn't it be simpler to define ComplexFilePattern taking a List<FilePattern> and have two implementations of FilePattern; one that uses FNMatch and one that uses strict String.equals()? Then this entire class becomes unnecessary as the pattern "documents/technical/*.txt" can be handled by two ExactMatch instances followd by an FNMatch instance. The performance difference is probably not even measurable, but the code will be less complicated and less special-cased. -- Shawn. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html