[ 
https://jira.duraspace.org/browse/DS-742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18002#action_18002
 ] 

Mark Diggory commented on DS-742:
---------------------------------

Should be sufficient, thanks for the correction.  I'm now thinking the 
NullPointer is caused by the setter not getting instantiated in some cases (for 
instance on Servlet Context reload). I do think we should be using teh Services 
framework for creating these objects, not the Plugin Manager.  We should be 
deprecating the PluginManager and ConfigurationManager rather than continuing 
to use this approach with static initializers.  Future projects on Embargo, 
Consumers and other Plugins should shift them out of dspace.cfg / plugin 
manager and into Spring configuration where things will be much more flexible.

> Embargo Fails with Null Pointer Exception on Item Install.
> ----------------------------------------------------------
>
>                 Key: DS-742
>                 URL: https://jira.duraspace.org/browse/DS-742
>             Project: DSpace
>          Issue Type: Bug
>          Components: DSpace API
>    Affects Versions: 1.6.0, 1.6.1, 1.6.2, 1.7.0
>            Reporter: Mark Diggory
>             Fix For: 1.7.0
>
>
> Embargo fails because the code fails to check for NullPointers appropriately.
> Fix
>         
>         DCDate result = null;
>         
>         // Its very 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);
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.duraspace.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to