[ 
http://jira.dspace.org/jira/browse/DS-419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Larry Stone updated DS-419:
---------------------------

    Attachment: ds-419.patch.txt

Here's a patch that should fix it, though I only did some light testing.  
Thanks for such a thorough report.

> Setting embargo.field.terms to an unqualified field throws uncaught exception 
> on item submission
> ------------------------------------------------------------------------------------------------
>
>                 Key: DS-419
>                 URL: http://jira.dspace.org/jira/browse/DS-419
>             Project: DSpace 1.x
>          Issue Type: Bug
>          Components: DSpace API
>    Affects Versions: 1.6.0
>            Reporter: Scott Hanrath
>            Priority: Minor
>         Attachments: ds-419.patch.txt
>
>
> Set the embargo.field.terms property in dspace.cfg to an unqualified field., 
> e.g.
>   embargo.field.terms = schema.field
> rather than
>   embargo.field.terms = schema.field.qualifier
> Then when completing an item submission, an uncaught ArrayIndexOutOfBounds 
> exception is throw by EmbargoManager.  The stack trace sent back to the 
> browser is:
> java.lang.ArrayIndexOutOfBoundsException: 2
>   at org.dspace.embargo.EmbargoManager.getQualifierOf(EmbargoManager.java:412)
>   at org.dspace.embargo.EmbargoManager.init(EmbargoManager.java:379)
>   at org.dspace.embargo.EmbargoManager.getEmbargoDate(EmbargoManager.java:161)
>   at org.dspace.content.InstallItem.installItem(InstallItem.java:94)
>   [...]
> Untested, but a reasonable starting point would be to check for sa.length 
> greater than 2, instead of 1 on line 412 of EmbargoManager.  Note than line 
> 405 has a similar problem (though less likely to show up) and that the 
> comments for getElementOf and getQualifierOf methods are misleading.

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

        

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to