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

issue 152: simple fix for null pointer #168

Merged
merged 2 commits into from
Jul 25, 2022
Merged

Conversation

al-niessner
Copy link
Contributor

πŸ—’οΈ Summary

Set a value to null then accessed it causing a 500 error when doing this request:

curl --location --request GET 'http://localhost:8080/collections/urn:nasa:pds:insight_rad:data_derived::7.0/products?summary-only=true' --header 'Accept: application/json'

βš™οΈ Test Data and/or Report

Now works:

$ curl --location --request GET 'http://localhost:8080/collections/urn:nasa:pds:insight_rad:data_derived::7.0/products?summary-only=true' --header 'Accept: application/json'
{"summary":{"q":"","hits":7,"took":145,"start":0,"limit":100,"sort":[],"properties":[]}}

♻️ Related Issues

#152

@al-niessner al-niessner self-assigned this Jul 23, 2022
@al-niessner
Copy link
Contributor Author

@tloubrieu-jpl @jordanpadams

Fixed and ready to be merged into branch issue_134_r101

WARNING -- this PR must be merged prior to PR #161

@@ -59,6 +59,7 @@ public void setResponse (SearchHit hit, List<String> fields)
@SuppressWarnings("unchecked")
public int setResponse(HitIterator hits, Summary summary, List<String> fields, boolean onlySummary)
{
int count = 0;
Copy link

Choose a reason for hiding this comment

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

UnusedVariable: This assignment to the local variable 'count' is never read.


Reply with "@sonatype-lift help" for info about LiftBot commands.
Reply with "@sonatype-lift ignore" to tell LiftBot to leave out the above finding from this PR.
Reply with "@sonatype-lift ignoreall" to tell LiftBot to leave out all the findings from this PR and from the status bar in Github.

When talking to LiftBot, you need to refresh the page to see its response. Click here to get to know more about LiftBot commands.


Was this a good recommendation?
[ πŸ™ Not relevant ] - [ πŸ˜• Won't fix ] - [ πŸ˜‘ Not critical, will fix ] - [ πŸ™‚ Critical, will fix ] - [ 😊 Critical, fixing now ]

@tloubrieu-jpl tloubrieu-jpl merged commit 9515a9d into issue_134_r101 Jul 25, 2022
@tloubrieu-jpl tloubrieu-jpl deleted the issue_152 branch July 25, 2022 17:24
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.

2 participants