mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 15:33:09 +00:00
[DS-1065] Don't dereference a missing 'id' attribute; leave authority null
This commit is contained in:
@@ -190,7 +190,9 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Choic
|
||||
{
|
||||
values[i] = node.getAttributes().getNamedItem("label").getNodeValue();
|
||||
}
|
||||
authorities[i] = node.getAttributes().getNamedItem("id").getNodeValue();
|
||||
Node idAttr = node.getAttributes().getNamedItem("id");
|
||||
if (null != idAttr) // 'id' is optional
|
||||
authorities[i] = idAttr.getNodeValue();
|
||||
}
|
||||
int resultCount = Math.min(labels.length - start, limit);
|
||||
choices = new Choice[resultCount];
|
||||
|
Reference in New Issue
Block a user