mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-09 02:54:20 +00:00
DS-1536 having a DOT in handle prefix causes identifier.uri to be cut off when being created.
This commit is contained in:
@@ -545,7 +545,7 @@ public class VersionedHandleIdentifierProvider extends IdentifierProvider {
|
||||
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 @@ public class VersionedHandleIdentifierProvider extends IdentifierProvider {
|
||||
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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user