mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 22:13:08 +00:00
Fix Objects.toString() calls to return empty string if null
This commit is contained in:
@@ -140,8 +140,8 @@ public class PersonAuthorityValue extends AuthorityValue {
|
|||||||
@Override
|
@Override
|
||||||
public void setValues(SolrDocument document) {
|
public void setValues(SolrDocument document) {
|
||||||
super.setValues(document);
|
super.setValues(document);
|
||||||
this.firstName = Objects.toString(document.getFieldValue("first_name"));
|
this.firstName = Objects.toString(document.getFieldValue("first_name"), "");
|
||||||
this.lastName = Objects.toString(document.getFieldValue("last_name"));
|
this.lastName = Objects.toString(document.getFieldValue("last_name"), "");
|
||||||
nameVariants = new ArrayList<String>();
|
nameVariants = new ArrayList<String>();
|
||||||
Collection<Object> document_name_variant = document.getFieldValues("name_variant");
|
Collection<Object> document_name_variant = document.getFieldValues("name_variant");
|
||||||
if (document_name_variant != null) {
|
if (document_name_variant != null) {
|
||||||
|
Reference in New Issue
Block a user