diff --git a/src/main/java/org/alfresco/repo/virtual/ref/ZeroReferenceParser.java b/src/main/java/org/alfresco/repo/virtual/ref/ZeroReferenceParser.java index 732f787568..bec1cb9662 100644 --- a/src/main/java/org/alfresco/repo/virtual/ref/ZeroReferenceParser.java +++ b/src/main/java/org/alfresco/repo/virtual/ref/ZeroReferenceParser.java @@ -113,7 +113,7 @@ else if ((protocolResourceEncoding - NODE_PROTOCOL_CODE) < VIRTUAL_PROTOCOL_CODE parameters); return reference; } - catch (ArrayIndexOutOfBoundsException e) + catch (ArrayIndexOutOfBoundsException | NumberFormatException e) { throw new ReferenceParseException("Invalid reference", e); diff --git a/src/test/java/org/alfresco/repo/virtual/store/VirtualStoreImplTest.java b/src/test/java/org/alfresco/repo/virtual/store/VirtualStoreImplTest.java index 7d0550f18d..fec857dfe3 100644 --- a/src/test/java/org/alfresco/repo/virtual/store/VirtualStoreImplTest.java +++ b/src/test/java/org/alfresco/repo/virtual/store/VirtualStoreImplTest.java @@ -265,6 +265,9 @@ public void testCanExistNodeIDwithV() // vp... createAndCheckNodeId("v"+Encodings.PLAIN.encoding.token+"file", "specialFile5.txt"); + // MNT-21968 + createAndCheckNodeId("v"+Encodings.ZERO.encoding.token+"0Draft.pdf", "specialFile6.txt"); + NodeRef virtualFolder = createVirtualizedFolder(testRootFolder.getNodeRef(), VIRTUAL_FOLDER_3_NAME, TEST_TEMPLATE_4_JSON_SYS_PATH); assertTrue(smartStore.canVirtualize(virtualFolder));