Skip to content

Dereference NULL return value#618

Closed
kansal wants to merge 5 commits intoapache:masterfrom
kansal:master
Closed

Dereference NULL return value#618
kansal wants to merge 5 commits intoapache:masterfrom
kansal:master

Conversation

@kansal
Copy link
Contributor

@kansal kansal commented Jul 23, 2015

No check on the null value of metadatafile. If null, the following operations failed. Added null check for the metadatafile.

@asfbot
Copy link

asfbot commented Jul 23, 2015

cloudstack-pull-rats #106 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Jul 23, 2015

cloudstack-pull-requests #804 UNSTABLE
Looks like there's a problem with this pull request

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please update the error message: "Provided Metadata is not a URL, Unable to locate metadata file from local path"

Copy link
Member

Choose a reason for hiding this comment

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

Can you also add the file path its trying to find (idpMetaDataUrl) to the error message?

@asfbot
Copy link

asfbot commented Jul 23, 2015

cloudstack-pull-analysis #39 UNSTABLE
Looks like there's a problem with this pull request

@asfbot
Copy link

asfbot commented Jul 23, 2015

cloudstack-pull-rats #111 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Jul 23, 2015

cloudstack-pull-rats #112 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Jul 23, 2015

cloudstack-pull-requests #809 UNSTABLE
Looks like there's a problem with this pull request

@asfbot
Copy link

asfbot commented Jul 23, 2015

cloudstack-pull-requests #810 SUCCESS
This pull request looks good

@DaanHoogland
Copy link
Contributor

thanks @kansal
Can you add some test cases (for null values found for instance)?
LGTM

@kansal
Copy link
Contributor Author

kansal commented Jul 23, 2015

@kishankavala: The message has been changed.
@karuturi: Added the path. Please check

I have also made another change with respect to solving this problem of dereferencing of null pointer. Kindly review the changes.

@asfbot
Copy link

asfbot commented Jul 23, 2015

cloudstack-pull-analysis #44 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Jul 23, 2015

cloudstack-pull-analysis #45 ABORTED

@karuturi
Copy link
Member

instead of a notnull check everywhere, can you use a Non Nulllable ArrayList for tags or use CollectionUtils.addIgnoreNull() api?

@kansal
Copy link
Contributor Author

kansal commented Jul 27, 2015

@DaanHoogland Added the test file. Checking only the false cases. @wilderrodrigues Got away with the IF statements and replaced with the api @karuturi suggested. Please review the changes.

@asfbot
Copy link

asfbot commented Jul 27, 2015

cloudstack-pull-rats #127 FAILURE
Looks like there's a problem with this pull request

@asfbot
Copy link

asfbot commented Jul 27, 2015

cloudstack-pull-requests #825 FAILURE
Looks like there's a problem with this pull request

@asfbot
Copy link

asfbot commented Jul 27, 2015

cloudstack-pull-analysis #60 FAILURE
Looks like there's a problem with this pull request

@asfbot
Copy link

asfbot commented Jul 27, 2015

cloudstack-pull-rats #128 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Jul 27, 2015

cloudstack-pull-requests #826 SUCCESS
This pull request looks good

@kishankavala
Copy link
Contributor

LGTM. @bhaisaab can you also take a look at the changes?

@asfbot
Copy link

asfbot commented Jul 27, 2015

cloudstack-pull-analysis #61 SUCCESS
This pull request looks good

@wilderrodrigues
Copy link
Contributor

LGTM 👍

Thanks for the improvements!

Copy link
Member

Choose a reason for hiding this comment

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

we can remove else {} here just keep;
if (condition){
return stuff();
}
return otherstuff();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bhaisaab I feel we can go with the if-else style because it anyhow is doing the same thing plus it give better code readability and logging. Your take?

@yadvr
Copy link
Member

yadvr commented Jul 27, 2015

@kansal Please see my comments. While it's okay, please squash the commits into two separate commits; one targeting the saml related stuff and second one targeting the other component, so as to allow us to port the commits to other branches.

@kansal
Copy link
Contributor Author

kansal commented Jul 28, 2015

Closing this pull request. Will open one for each issue.

@kansal kansal closed this Jul 28, 2015
yadvr pushed a commit that referenced this pull request Jan 20, 2021
Fixes #618

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants