Skip to content

Commit

Permalink
Expand scope of equals() in PerTargetInstantiationModelPointcut
Browse files Browse the repository at this point in the history
This commit expands the scope of equality checks in the implementation
of equals() for PerTargetInstantiationModelPointcut to include all
fields instead of just the pointcut expression for the declared
pointcut.

See spring-projectsgh-31238
  • Loading branch information
sbrannen committed Sep 22, 2023
1 parent 0f92ba1 commit f7496a3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ private boolean isAspectMaterialized() {
@Override
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof PerTargetInstantiationModelPointcut that &&
ObjectUtils.nullSafeEquals(this.declaredPointcut.getExpression(), that.declaredPointcut.getExpression())));
ObjectUtils.nullSafeEquals(this.declaredPointcut, that.declaredPointcut) &&
ObjectUtils.nullSafeEquals(this.preInstantiationPointcut, that.preInstantiationPointcut) &&
ObjectUtils.nullSafeEquals(this.aspectInstanceFactory, that.aspectInstanceFactory)));
}

@Override
Expand Down

0 comments on commit f7496a3

Please sign in to comment.