You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Jira)" <ji...@apache.org> on 2025/06/05 14:27:00 UTC

[jira] [Commented] (HTTPCORE-783) ContentType should implement equals() and hashCode()

    [ https://issues.apache.org/jira/browse/HTTPCORE-783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17956368#comment-17956368 ] 

Oleg Kalnichevski commented on HTTPCORE-783:
--------------------------------------------

[~ggregory]  Are these content-type equal or not?

"text/plain", "text/plain; charset=ASCII",  "text/plain; charset=USASCII",  "text/plain; charset=ASCII, blah", "text/plain; charset=ASCII, blah=blah"

Oleg

> ContentType should implement equals() and hashCode()
> ----------------------------------------------------
>
>                 Key: HTTPCORE-783
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-783
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>            Reporter: Gary D. Gregory
>            Priority: Major
>
> I find it confusing that {{ContentType}} doesn't implement {{equals()}} and {{hashCode()}}.
> Instead it implement a method called {{isSameMimeType(contentType))}} which is documented to ... well, there's zero Javadoc.
> I think we should implement {{equals()}} and {{hashCode()}} to either:
> - Call {{super}} and Javadoc why
> - Provide a "proper" implementation which could (initially) ignore parameters (or not).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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