Skip to content

Commit

Permalink
[fix] class uniqueness rule must have a config (#638)
Browse files Browse the repository at this point in the history
## Before this PR
The rule would match against `checkClassUniqueness`, which would fail since upper-casing an empty string ends up in an index out of bounds exception.

## After this PR
Doesn't match against `checkClassUniqueness` since it now requires at least 1 character in the regex.
jmcampanini authored and bulldozer-bot[bot] committed May 17, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 61f8196 commit d1de17d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
import org.gradle.api.artifacts.Configuration;

public final class BaselineClassUniquenessRule implements Rule {
private static final Pattern TASK_NAME_PATTERN = Pattern.compile("^check(.*)ClassUniqueness$");
private static final Pattern TASK_NAME_PATTERN = Pattern.compile("^check(.+)ClassUniqueness$");
private final Project project;

public BaselineClassUniquenessRule(Project project) {

0 comments on commit d1de17d

Please sign in to comment.