hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1618327 - /httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java
Date Sat, 16 Aug 2014 11:06:26 GMT
Author: olegk
Date: Sat Aug 16 11:06:26 2014
New Revision: 1618327

URL: http://svn.apache.org/r1618327
Log:
HTTPCLIENT-1544: Fixed NPE in ResponseProcessCookies when running with DEBUG priority

Modified:
    httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java

Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java?rev=1618327&r1=1618326&r2=1618327&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java
(original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java
Sat Aug 16 11:06:26 2014
@@ -137,10 +137,12 @@ public class ResponseProcessCookies impl
         buf.append(cookie.getName());
         buf.append("=\"");
         String v = cookie.getValue();
-        if (v.length() > 100) {
-            v = v.substring(0, 100) + "...";
+        if (v != null) {
+            if (v.length() > 100) {
+                v = v.substring(0, 100) + "...";
+            }
+            buf.append(v);
         }
-        buf.append(v);
         buf.append("\"");
         buf.append(", version:");
         buf.append(Integer.toString(cookie.getVersion()));



Mime
View raw message