Skip to content

Commit

Permalink
MNT-21968 : Cannot use some document names if Smart Folders feature i…
Browse files Browse the repository at this point in the history
…s enabled

MNT-21968 : Cannot use some document names if Smart Folders feature is enabled
   - catch NumberFormatException on parseInt
   - test case "v00Draft.pdf"
  • Loading branch information
nbarithel authored Jan 11, 2021
1 parent 89fddfc commit a6fce73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit a6fce73

Please sign in to comment.