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

eliminate an hidden npe risk in current develop branch. #8785

Closed
wants to merge 1 commit into from

Conversation

zhaoyangyingmu
Copy link

@zhaoyangyingmu zhaoyangyingmu commented Jun 8, 2022

What this PR does / why we need it:

This PR eliminate a hidden npe risk mentioned in #8777.

Which issue(s) this PR closes:

Special notes for your reviewer:

public boolean isEmpty() {
        return ((abbreviation==null || abbreviation.getValue()==null || abbreviation.getValue().trim().equals(""))
            && (affiliation==null || affiliation.getValue()==null || affiliation.getValue().trim().equals(""))
            && (logo==null || logo.getValue()==null || logo.getValue().trim().equals(""))
            && (name==null || name.getValue()==null || name.getValue().trim().equals(""))
            && (url==null || url.getValue()==null || url.getValue().trim().equals("")));
    }

When abbreviation.getValue()==null, the datafield will be regarded as empty.
Suggestions on how to test this:
N/A
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope.
Is there a release notes update needed for this change?:
N/A
Additional documentation:
N/A

&& (logo==null || logo.getValue().trim().equals(""))
&& (name==null || name.getValue().trim().equals(""))
&& (url==null || url.getValue().trim().equals("")));
return ((abbreviation==null || abbreviation.getValue()==null || abbreviation.getValue().trim().equals(""))
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use StringUtils.isBlank to simplify the code here?

@scolapasta scolapasta self-assigned this Aug 3, 2022
@scolapasta
Copy link
Contributor

Moving back to community dev until we here back from @zhaoyangyingmu

@pdurbin
Copy link
Member

pdurbin commented Jan 3, 2023

@zhaoyangyingmu did you see the review by @scolapasta above?

Also, instead of making a pull request from a branch called "develop" (which can cause trouble for us when we check it out on our laptops), if you're still interested in getting this merged can you please create a new PR from a branch called something like "8777-npe"?

Finally, I see you wrote "N/A" under "Suggestions on how to test this" but we would actually appreciate whatever guidance you can provide on how to reproduce the bug.

@pdurbin
Copy link
Member

pdurbin commented Oct 8, 2023

@zhaoyangyingmu just checking in. Should we close this? Or are you still interested? Thanks.

@pdurbin pdurbin added Size: 3 A percentage of a sprint. 2.1 hours. Component: Code Infrastructure formerly "Feature: Code Infrastructure" labels Feb 28, 2024
@scolapasta
Copy link
Contributor

If you are still interested in this PR, can you please merge and resolve any merge conflicts with the latest from develop? If so, we can prioritize reviewing and QAing the changes. If we don’t hear from you by May 22, 2024, we’ll go ahead and close this PR (it can always be reopened after that date, if there is still interest).

@pdurbin
Copy link
Member

pdurbin commented May 23, 2024

If we don’t hear from you by May 22, 2024, we’ll go ahead and close this PR (it can always be reopened after that date, if there is still interest).

Closing.

@pdurbin pdurbin closed this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure" Size: 3 A percentage of a sprint. 2.1 hours.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A Hidden NPE Bug in Current develop Branch
4 participants