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:
Pascal-Nicolas Becker
2014-09-05 16:08:00 +02:00
parent bd105d1006
commit 8c6a9df40c

View File

@@ -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();