On 14 December 2010 19:25, Oleg Kalnichevski <[email protected]> wrote:
> On Tue, 2010-12-14 at 17:42 +0000, [email protected] wrote:
>> Author: sebb
>> Date: Tue Dec 14 17:42:10 2010
>> New Revision: 1049192
>>
>> URL: http://svn.apache.org/viewvc?rev=1049192&view=rev
>> Log:
>> Add entrySet() to abstract parent class and other existing implementation
>>
>> Modified:
>>
>> httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java
>>
>> httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/DefaultedHttpParams.java
>>
>
> Sebastian,
>
> Unfortunately, addition of an abstract method to an abstract class
> breaks binary compatibility
OK, I could make it return null instead?
> [INFO] Comparing to version: 4.1
> [ERROR] org.apache.http.params.AbstractHttpParams: Abstract method
> 'public java.util.Set entrySet()' has been added
>
>>
>> + /**
>> + * Provide access to the set of local parameters as Map.Entry elements.
>> + * To get the entrySet for the default parameters,
>> + * use {...@code ((AbstractHttpParams) getDefaults()).entrySet()}
>> + * @return the Set of Map.Entry<String, Object> elements
>> + * @since 4.1.1
>> + * @throws ClassCastException if local parameters cannot be cast to
>> AbstractHttpParams
>> + */
>> + public Set entrySet() {
>> + return ((AbstractHttpParams) local).entrySet();
>> + }
>
> I also do not think this cast to AbstractHttpParams is a good idea.
Why not?
All the provided implementations extend it.
> Oleg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]