Permalink
Browse files

Merge pull request #305 from rivaldi8/DS-1536

DS-1536 having a DOT in handle prefix causes identifier.uri to be cut of...
  • Loading branch information...
mwoodiupui committed Feb 5, 2014
2 parents 8f35788 + 45d702c commit 0bc01a80159a5925c7591601c9a46b64eb09112b
@@ -545,7 +545,7 @@ protected String modifyHandleRecord(Context context, DSpaceObject dso, TableRow
protected String getCanonical(Item item)
{
String canonical = item.getHandle();
- if( canonical.lastIndexOf(DOT)!=-1)
+ if( canonical.matches(".*/.*\\.\\d+") && canonical.lastIndexOf(DOT)!=-1)
{
canonical = canonical.substring(0, canonical.lastIndexOf(DOT));
}
@@ -556,7 +556,7 @@ protected String getCanonical(Item item)
protected String getCanonical(String identifier)
{
String canonical = identifier;
- if( canonical.lastIndexOf(DOT)!=-1)
+ if( canonical.matches(".*/.*\\.\\d+") && canonical.lastIndexOf(DOT)!=-1)
{
canonical = canonical.substring(0, canonical.lastIndexOf(DOT));
}

0 comments on commit 0bc01a8

Please sign in to comment.