Skip to content

Commit

Permalink
Merge branch 'master' into fix-memory-usage
Browse files Browse the repository at this point in the history
  • Loading branch information
beryxz authored Mar 14, 2024
2 parents 9748eff + 6df8da5 commit d716c07
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class RegexEntity {
private final EnumSet<ProxyItemSection> sections;
private final List<String> tests;
private boolean active;

public RegexEntity(String description, String regex) throws IllegalArgumentException {
this(description, regex, true, ProxyItemSection.getDefault(), null);
}
Expand Down Expand Up @@ -114,8 +115,13 @@ public String getSectionsHumanReadable() {
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RegexEntity that = (RegexEntity) o;
return this.getRegex().equals(that.getRegex());
RegexEntity entity = (RegexEntity) o;
return Objects.equals(getRegex(), entity.getRegex()) && Objects.equals(getDescription(), entity.getDescription()) && Objects.equals(getSections(), entity.getSections());
}

@Override
public int hashCode() {
return Objects.hash(getRegex(), getDescription(), getSections());
}

@Override
Expand All @@ -126,9 +132,4 @@ public String toString() {
", sections=" + sections +
'}';
}

@Override
public int hashCode() {
return Objects.hash(this.getRegex());
}
}

0 comments on commit d716c07

Please sign in to comment.