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

Remove redundant conditions #32674

Closed
wants to merge 1 commit into from
Closed

Conversation

dukbong
Copy link
Contributor

@dukbong dukbong commented Apr 19, 2024

Revised the portion where null check was performed after Assert.notNull(), eliminating redundant null checks.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 19, 2024
public Builder withMode(ExecutableMode mode) {
Assert.notNull(mode, "'mode' must not be null");
if ((this.mode == null) || !this.mode.includes(mode)) {
if (!this.mode.includes(mode)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mode and this.mode refer to two different objects.

Thus, the proposed change is invalid.

@sbrannen sbrannen added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Apr 19, 2024
@sbrannen
Copy link
Member

Closing since the proposed change is invalid.

@sbrannen sbrannen closed this Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants