mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-10 03:23:13 +00:00
[DS-742] Embargo Fails with Null Pointer Exception on Item Install.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5739 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -155,7 +155,14 @@ public class EmbargoManager
|
||||
{
|
||||
init();
|
||||
DCValue terms[] = item.getMetadata(terms_schema, terms_element, terms_qualifier, Item.ANY);
|
||||
DCDate result = setter.parseTerms(context, item, terms.length > 0 ? terms[0].value : null);
|
||||
|
||||
DCDate result = null;
|
||||
|
||||
// Its poor form to blindly use an object that could be null...
|
||||
if(terms != null && terms[0] != null)
|
||||
{
|
||||
result = setter.parseTerms(context, item, terms.length > 0 ? terms[0].value : null);
|
||||
}
|
||||
|
||||
// sanity check: do not allow an embargo lift date in the past.
|
||||
if (result != null && result.toDate().before(new Date()))
|
||||
|
Reference in New Issue
Block a user