Merged HEAD (5.1) to 5.1.N (5.1.1)

115803 mgardner: ACE-4317 parse emailed potential dbid as a long before using as a solr query parameter


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@115808 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-11-03 08:09:55 +00:00
parent 3675027287
commit 2efb428d36

View File

@@ -456,13 +456,17 @@ public class EmailServiceImpl implements EmailService
ResultSet resultSet = null;
try
{
String query = "@sys\\:node-dbid:" + parts[0];
Long nodeId = Long.parseLong(parts[0]);
String query = "@sys\\:node-dbid:" + nodeId;
resultSet = searchService.query(storeRef, SearchService.LANGUAGE_LUCENE, query);
if (resultSet.length() > 0)
{
return resultSet.getNodeRef(0);
}
}
catch (NumberFormatException e)
{
}
finally
{
if(resultSet != null)
@@ -470,6 +474,7 @@ public class EmailServiceImpl implements EmailService
resultSet.close();
}
}
throw new EmailMessageException(ERR_INVALID_NODE_ADDRESS, recipient);
}