Merged HEAD (5.2) to 5.2.N (5.2.1)

126386 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
      120471 jvonka: FileFolder API - NodeApiTest - follow-on to fix NPE in debug logging
      RA-641


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126732 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-05-11 10:56:59 +00:00
parent 7801810028
commit 970b2ca96e

View File

@@ -27,6 +27,7 @@ package org.alfresco.rest.api.tests.client;
import java.util.Map;
import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.HttpMethodBase;
import org.apache.commons.httpclient.URIException;
@@ -145,7 +146,12 @@ public class HttpResponse
sb.append("user ").append(user).append("\n");
sb.append("returned ").append(method.getStatusCode()).append(" and took ").append(time).append("ms").append("\n");
String contentType = method.getResponseHeader("Content-Type").getValue();
String contentType = null;
Header hdr = method.getResponseHeader("Content-Type");
if (hdr != null)
{
contentType = hdr.getValue();
}
sb.append("Response content type: ").append(contentType).append("\n");
if (contentType != null)