Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (4.3/Cloud)

72923: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (4.3/Cloud)
      72734: Merged DEV to V4.2-BUG-FIX
       MNT-11198 : NPE exception is thrown on second sync to cloud attempt when log4j.logger.org.alfresco.repo.remoteconnector.RemoteConnectorServiceImpl=DEBUG is in place
       Was added a null and a type check. 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@74745 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Will Abson
2014-06-25 15:43:31 +00:00
parent 4c69e0c58c
commit 7956329a4b

View File

@@ -182,13 +182,17 @@ public class RemoteConnectorServiceImpl implements RemoteConnectorService
{
logger.debug("Header: " + hdr );
}
Object requestBody = request.getRequestBody();
if (requestBody instanceof StringRequestEntity)
Object requestBody = null;
if (request != null)
{
requestBody = request.getRequestBody();
}
if (requestBody != null && requestBody instanceof StringRequestEntity)
{
StringRequestEntity re = (StringRequestEntity)request.getRequestBody();
logger.debug("Payload (string): " + re.getContent());
}
else if (requestBody instanceof ByteArrayRequestEntity)
else if (requestBody != null && requestBody instanceof ByteArrayRequestEntity)
{
ByteArrayRequestEntity re = (ByteArrayRequestEntity)request.getRequestBody();
logger.debug("Payload (byte array): " + re.getContent().toString());