Skip to content

Commit

Permalink
Merge pull request #305 from rivaldi8/DS-1536
Browse files Browse the repository at this point in the history
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 0bc01a8
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -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));
}
Expand All @@ -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));
}
Expand Down

0 comments on commit 0bc01a8

Please sign in to comment.