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

#8667 fix null pointer exception #8668

Merged
merged 1 commit into from
May 24, 2022

Conversation

pkiraly
Copy link
Member

@pkiraly pkiraly commented Apr 29, 2022

What this PR does / why we need it:

To prevent a NullPointerException.

Which issue(s) this PR closes:

Closes #8667

Special notes for your reviewer:
In the method I did some code format change, because it was not clear at some points where the opening brackets end.

Suggestions on how to test this:
Do

wget https://gdcc.github.io/dataverse-external-vocab-support/examples/config/cvoc-conf.json
curl -X PUT --upload-file cvoc-conf.json http://localhost:8080/api/admin/settings/:CVocConf

and compare before/after PR w.r.t. the log and site functionality (see issue).

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No

Is there a release notes update needed for this change?:
No

Additional documentation:
No

Copy link
Member

@qqmyers qqmyers left a comment

Choose a reason for hiding this comment

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

Makes sense - a straight-forward improvement in handling bad CVOC input.

It would be good to add specific instructions for how to cause/test this issue - in the latest release with standard metadata blocks - presumably you need a CVOC config file that has an entry for a non-existent field so dft is null - can you provide a file for this?

@pkiraly
Copy link
Member Author

pkiraly commented Apr 29, 2022

@qqmyers What I did is simply these two commands:

wget https://gdcc.github.io/dataverse-external-vocab-support/examples/config/cvoc-conf.json
curl -X PUT --upload-file cvoc-conf.json http://localhost:8080/api/admin/settings/:CVocConf

Sorry, I do not get what file do you suggest exactly. Could you give a brief explanation? I can put these commands to a file, but what should be its name, and where to put it?

@qqmyers
Copy link
Member

qqmyers commented Apr 29, 2022

Those two commands are enough - I wanted to make sure that the cvoc-conf.json you used is accessible (and it is at https://gdcc.github.io/dataverse-external-vocab-support/examples/config/cvoc-conf.json) and that that would demonstrate the issue with the develop branch (it should because "field-name": "compoundDemo" doesn't exist in any of the standard metadata blocks.)

@sekmiller sekmiller removed their assignment May 23, 2022
@kcondon kcondon self-assigned this May 23, 2022
@kcondon kcondon merged commit f578a5e into IQSS:develop May 24, 2022
@pdurbin pdurbin added this to the 5.11 milestone Jun 2, 2022
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.

Suggestion for fixing a NullPointerException
5 participants