Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise AbstractBeanDefinition equals implementation #24048

Merged
merged 1 commit into from Nov 21, 2019

Conversation

chenqimiao
Copy link
Contributor

The following way of writing seems a bit redundant

rtn = rtn &= ObjectUtils.nullSafeEquals(this.scope, that.scope);

I think we can polish it by writing the following.

rtn &= ObjectUtils.nullSafeEquals(this.scope, that.scope);

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 21, 2019
@sbrannen sbrannen self-assigned this Nov 21, 2019
@sbrannen sbrannen added type: task A general task in: core Issues in core modules (aop, beans, core, context, expression) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 21, 2019
@sbrannen sbrannen changed the title Polishing Polish AbstractBeanDefinition Nov 21, 2019
@sbrannen sbrannen merged commit bb2e3ce into spring-projects:master Nov 21, 2019
@sbrannen
Copy link
Member

This has been merged into master.

Thanks

@jhoeller
Copy link
Contributor

Actually, this wasn't intending to use & to begin with, rather && with its short-circuiting of the right-hand side if the left-hand side is false already. I'll update this accordingly, also backporting it to 5.1.x.

@jhoeller jhoeller assigned jhoeller and unassigned sbrannen Nov 21, 2019
@jhoeller jhoeller added type: bug A general bug and removed type: task A general task labels Nov 21, 2019
@jhoeller jhoeller added this to the 5.2.2 milestone Nov 21, 2019
@jhoeller jhoeller changed the title Polish AbstractBeanDefinition Restore short-circuiting in AbstractBeanDefinition equals implementation Nov 21, 2019
@jhoeller jhoeller changed the title Restore short-circuiting in AbstractBeanDefinition equals implementation Revise AbstractBeanDefinition equals implementation Nov 21, 2019
jhoeller added a commit that referenced this pull request Nov 21, 2019
@jhoeller jhoeller added the for: backport-to-5.1.x Marks an issue as a candidate for backport to 5.1.x label Nov 21, 2019
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.1.x Marks an issue as a candidate for backport to 5.1.x labels Nov 21, 2019
jhoeller added a commit that referenced this pull request Nov 21, 2019
@dreis2211
Copy link
Contributor

dreis2211 commented Nov 21, 2019

I wonder if that makes a performance difference 🤔

@chenqimiao chenqimiao deleted the feature/polishing branch November 22, 2019 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants