Skip to content

Commit

Permalink
Use AbstractProperty#equals
Browse files Browse the repository at this point in the history
  • Loading branch information
dordsor21 committed Nov 16, 2024
1 parent 0517852 commit 916e46d
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,7 @@ public boolean hasProperty(PropertyKey key) {
*/
public boolean hasProperty(Property<?> property) {
int ordinal = property.getKey().getId();
Property<?> selfProperty;
return this.settings.propertiesMapArr.length > ordinal
&& (selfProperty = this.settings.propertiesMapArr[ordinal]) != null
&& selfProperty == property;
return this.settings.propertiesMapArr.length > ordinal && property.equals(this.settings.propertiesMapArr[ordinal]);
}

public <V> Property<V> getProperty(PropertyKey key) {
Expand Down

0 comments on commit 916e46d

Please sign in to comment.