You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Jean-Baptiste Voron (JIRA)" <ji...@apache.org> on 2010/12/08 16:16:00 UTC
[jira] Created: (HTTPCLIENT-1031) Cannot clone BasicClientCookie2
without specified ports
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
[jira] Resolved: (HTTPCLIENT-1031) Cannot clone BasicClientCookie2
without specified ports
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved HTTPCLIENT-1031.
------------------------------
Resolution: Fixed
Thanks for the report; fixed (and test added).
> 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.0.3, 4.1 Alpha1, 4.1 Alpha2, 4.1 Beta1
> 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