Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Fix MNT-21968 catch NumberFormatException on parseInt #1263

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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