[
https://jira.duraspace.org/browse/DS-815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21193#action_21193
]
Robin Taylor commented on DS-815:
---------------------------------
Just a quick comment. There have been a number of attempts to incorporate date
validation into DCDate, by Kim Shepherd and myself that I know of, that have
proved fruitless. The reason being that the UI metadata pages only allow for a
check on the presence of a value or not, there is no current way to indicate to
the user that the value failed some validation test. This applies to all the
metadata fields, not just dates. For that reason it serves no purpose to return
any indication of an invalid date to the UI metadata input code because there
is no way of passing on that information to the user.
The UI currently insists on a year so I would be interested to know how the
data was entered. Whilst a shared validation solution would be ideal the best
quick fix might be to plug whatever gap allowed this dodgy data to be loaded.
Cheers, Robin.
> DCDate throws NullPointerException with mangled dates
> -----------------------------------------------------
>
> Key: DS-815
> URL: https://jira.duraspace.org/browse/DS-815
> Project: DSpace
> Issue Type: Bug
> Components: DSpace API
> Affects Versions: 1.7.0
> Environment: CentOS 5.4 with OpenJDK 64-Bit Server VM (build
> 1.6.0-b09, mixed mode)
> Reporter: Àlex Magaz Graça
> Assignee: Mark H. Wood
> Attachments: DCDate_test_mangled_date.patch
>
>
> DCDate.get*() methods throw a NullPointerException if the object has been
> constructed with a wrong date like "[17--?]" (DCDateTest patch attached):
> java.lang.NullPointerException
> at org.dspace.content.DCDate.getYear(DCDate.java:298)
> at org.dspace.content.DCDateTest.testDCDateString(DCDateTest.java:301)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
> at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> It makes the browse by issue date fail in JSPUI.
--
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
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel