Skip to content

Commit

Permalink
properly fixes #340
Browse files Browse the repository at this point in the history
  • Loading branch information
erosb committed Dec 22, 2019
1 parent f493f0c commit a610a21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class JavaUtilRegexp extends AbstractRegexp {
if (!(o instanceof JavaUtilRegexp))
return false;
JavaUtilRegexp that = (JavaUtilRegexp) o;
return Objects.equals(pattern, that.pattern);
return Objects.equals(pattern.pattern(), that.pattern.pattern());
}

@Override public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void asString() {
public void equalsVerifier() {
EqualsVerifier.forClass(JavaUtilRegexp.class)
.withPrefabValues(Pattern.class, Pattern.compile("red"), Pattern.compile("black"))
.withIgnoredFields("asString")
.withIgnoredFields("asString").withNonnullFields("pattern")
.suppress(Warning.STRICT_INHERITANCE)
.verify();
}
Expand Down

0 comments on commit a610a21

Please sign in to comment.