[ 
http://jira.dspace.org/jira/browse/DS-636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11763#action_11763
 ] 

Mark Wood commented on DS-636:
------------------------------

OK, I yield: HandleManager.createId() might first be called long after a DSpace 
webapp has started, so there is no clean way to exit. I will suggest having the 
code default, in the unconfigured case, to 123456789 as we have in the 
configuration that ships. At least, the Handle System recognizes that prefix as 
"unconfigured DSpace instance" so it is a de-facto example handle analogous to 
the domain "example.com".

There are *eleven* occurrences of the string '"handle.prefix"' in the Java 
code, scattered all over. I suggest that HandleManager acquire a new method 
String getPrefix() to handle the defaulting in one place and always return a 
non-null reference, and using it to replace those lookups. This would also be a 
small step toward generalizing the code which deals in persistent identifiers.

> Error Check Needed for handle.prefix in Dspace.cfg
> --------------------------------------------------
>
>                 Key: DS-636
>                 URL: http://jira.dspace.org/jira/browse/DS-636
>             Project: DSpace 1.x
>          Issue Type: Bug
>          Components: DSpace API
>    Affects Versions: 1.6.0
>            Reporter: Tim Donohue
>            Assignee: Mark Wood
>            Priority: Minor
>
> This was reported to the old SourceForge Bug Tracker (now closed down), by 
> Jason (zenthanian):
> v1.60
> /dspace-api/src/main/java/org/dspace/handle/HandleManager.java
> needs to handle missing "hande.prefix" in dspace.cfg
> if not there the following line results in a null value
>         String handlePrefix = 
> ConfigurationManager.getProperty("handle.prefix");
> then the following line bombs with a nullpointer exception.
>         return new StringBuffer().append(handlePrefix).append(
>                 handlePrefix.endsWith("/") ? "" : "/").append(id).toString();
> suggest to insert the following between the two lines 
> if (handlePrefix == null)
> {
>       log.warning("handle.prefix not set in config file.")
> }

-- 
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

        

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to