mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 18:44:22 +00:00
DSpaceObject.getIdentifier(Context) should never return null.
If an DSO does not have any identifiers (including handle) this method should return an empty string array. G.e. an item during submission (workspace item) has no identifiers at all. This commits prevents NPE in event handling classes.
This commit is contained in:
@@ -134,6 +134,13 @@ public abstract class DSpaceObject
|
||||
}
|
||||
}
|
||||
|
||||
// it the DSO has no identifiers at all including handle, we should return an empty array.
|
||||
// G.e. items during submission (workspace items) have no handle and no other identifier.
|
||||
if (identifiers == null)
|
||||
{
|
||||
identifiers = new String[] {};
|
||||
}
|
||||
|
||||
if (log.isDebugEnabled())
|
||||
{
|
||||
StringBuilder dbgMsg = new StringBuilder();
|
||||
|
Reference in New Issue
Block a user