hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Baptiste Voron (JIRA)" <j...@apache.org>
Subject [jira] Created: (HTTPCLIENT-1031) Cannot clone BasicClientCookie2 without specified ports
Date Wed, 08 Dec 2010 15:16:00 GMT
Cannot clone BasicClientCookie2 without specified ports

                 Key: HTTPCLIENT-1031
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1031
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 4.1 Beta1, 4.1 Alpha2, 4.1 Alpha1, 4.0.3
            Reporter: Jean-Baptiste Voron

The clone method returns a null pointer exception when called on a BasicClientCookie2 that
does not use any ports properties.
In other words, it is impossible to clone a BasicClientCookie2 instance without ports specification.

In the clone() method, they are two main instructions :
 - calling clone() method on super
 - calling clone() method on the ports integer array (which is null)

It may be a good idea to check whether the array is null or not

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message