On Fri, 2018-04-06 at 10:02 -0600, Gary Gregory wrote: > Hi All: > > I have cases where I want to use a Set of > org.apache.http.NameValuePair > instead of a list of NameValuePair (to track what headers I need to > remove > for example.). > > But, since NameValuePair does not specify equals() and hashCode() it > feels > like I am using an undocumented feature of the implementation of > Basic > NameValuePair. > > Adding these two method would tell call sites: Yes, you can use > NameValuePair > in a Set, Map, and so on. This assumes that all implementation > already > support the two methods... so if a 3rd party does not, the changes > are > misleading. > > Thought? > > Gary
I am not sure I understand. NameValuePair is an interface, is it not? It cannot implement #equals and #hashCode. Besides we are back to the same fundamental question: what constitutes equality of two HTTP headers if we are to mandate Header to implement #equals and #hashCode. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org