You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Roland Weber (JIRA)" <ji...@apache.org> on 2007/05/05 11:09:15 UTC

[jira] Created: (HTTPCORE-71) [Basic]HttpParams can not be duplicated

[Basic]HttpParams can not be duplicated
---------------------------------------

                 Key: HTTPCORE-71
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-71
             Project: HttpComponents Core
          Issue Type: Bug
          Components: HttpCore
    Affects Versions: 4.0-alpha4
            Reporter: Roland Weber
         Assigned To: Roland Weber
            Priority: Minor
             Fix For: 4.0-alpha5


There is no method to obtain a list of parameter names. Neither does BasicHttpParams implement the Cloneable interface. This makes it impossible to duplicate a given set of parameters.

I'll come up with a patch in a week or two. Probably the clone() option, since it avoids the problem of parent parameters.

cheers,
  Roland


-- 
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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCORE-71) [Basic]HttpParams can not be duplicated

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497169 ] 

Oleg Kalnichevski commented on HTTPCORE-71:
-------------------------------------------

Looks good. Do you mind calling the public method #copy() for the sake of consistency with BasicHttpProcessor? 

Oleg

> [Basic]HttpParams can not be duplicated
> ---------------------------------------
>
>                 Key: HTTPCORE-71
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-71
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.0-alpha4
>            Reporter: Roland Weber
>         Assigned To: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-alpha5
>
>         Attachments: 2k7-05-19-param-copy.txt
>
>
> There is no method to obtain a list of parameter names. Neither does BasicHttpParams implement the Cloneable interface. This makes it impossible to duplicate a given set of parameters.
> I'll come up with a patch in a week or two. Probably the clone() option, since it avoids the problem of parent parameters.
> cheers,
>   Roland

-- 
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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Updated: (HTTPCORE-71) [Basic]HttpParams can not be duplicated

Posted by "Roland Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roland Weber updated HTTPCORE-71:
---------------------------------

    Attachment: 2k7-05-19-param-copy.txt

This patch adds BasicHttpParams.copyParams(). Internally, it is split in two methods so that derived classes which have to change only the class of the copy have minimal effort. A test case for copying is included.

cheers,
  Roland


> [Basic]HttpParams can not be duplicated
> ---------------------------------------
>
>                 Key: HTTPCORE-71
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-71
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.0-alpha4
>            Reporter: Roland Weber
>         Assigned To: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-alpha5
>
>         Attachments: 2k7-05-19-param-copy.txt
>
>
> There is no method to obtain a list of parameter names. Neither does BasicHttpParams implement the Cloneable interface. This makes it impossible to duplicate a given set of parameters.
> I'll come up with a patch in a week or two. Probably the clone() option, since it avoids the problem of parent parameters.
> cheers,
>   Roland

-- 
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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCORE-71) [Basic]HttpParams can not be duplicated

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493871 ] 

Oleg Kalnichevski commented on HTTPCORE-71:
-------------------------------------------

There are enough people who believe Cloneable / Object#clone() combo is completely flawed. Would not a trivial HttpParams#copy() suffice?

Oleg  

> [Basic]HttpParams can not be duplicated
> ---------------------------------------
>
>                 Key: HTTPCORE-71
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-71
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.0-alpha4
>            Reporter: Roland Weber
>         Assigned To: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-alpha5
>
>
> There is no method to obtain a list of parameter names. Neither does BasicHttpParams implement the Cloneable interface. This makes it impossible to duplicate a given set of parameters.
> I'll come up with a patch in a week or two. Probably the clone() option, since it avoids the problem of parent parameters.
> cheers,
>   Roland

-- 
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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Closed: (HTTPCORE-71) [Basic]HttpParams can not be duplicated

Posted by "Roland Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roland Weber closed HTTPCORE-71.
--------------------------------

    Resolution: Fixed

Method renamed, patch committed.

> [Basic]HttpParams can not be duplicated
> ---------------------------------------
>
>                 Key: HTTPCORE-71
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-71
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.0-alpha4
>            Reporter: Roland Weber
>         Assigned To: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-alpha5
>
>         Attachments: 2k7-05-19-param-copy.txt
>
>
> There is no method to obtain a list of parameter names. Neither does BasicHttpParams implement the Cloneable interface. This makes it impossible to duplicate a given set of parameters.
> I'll come up with a patch in a week or two. Probably the clone() option, since it avoids the problem of parent parameters.
> cheers,
>   Roland

-- 
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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCORE-71) [Basic]HttpParams can not be duplicated

Posted by "Ortwin Glück (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493873 ] 

Ortwin Glück commented on HTTPCORE-71:
--------------------------------------

The Cloneable "interface" and Object's implementation are definitely flawed IMO. Basically it makes no sense to blindly use clone() of an Object without having read the implementation details. It's simply undefined what you will get. Also the cumbersome exception is annoying. Some classes declare it, others catch it internally. But apart from that it's quite handy. As long as you know the Object that you are dealing with (specific clone() contract) it's okay. It's basically the same as having a non-standard copy() method.

> [Basic]HttpParams can not be duplicated
> ---------------------------------------
>
>                 Key: HTTPCORE-71
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-71
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.0-alpha4
>            Reporter: Roland Weber
>         Assigned To: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-alpha5
>
>
> There is no method to obtain a list of parameter names. Neither does BasicHttpParams implement the Cloneable interface. This makes it impossible to duplicate a given set of parameters.
> I'll come up with a patch in a week or two. Probably the clone() option, since it avoids the problem of parent parameters.
> cheers,
>   Roland

-- 
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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org