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

Abhishek Dasgupta commented on MESOS-4765:
------------------------------------------

+1

> Add equality operator for `process::http::URL` objects.
> -------------------------------------------------------
>
>                 Key: MESOS-4765
>                 URL: https://issues.apache.org/jira/browse/MESOS-4765
>             Project: Mesos
>          Issue Type: Task
>          Components: HTTP API, libprocess
>            Reporter: Anand Mazumdar
>            Priority: Minor
>              Labels: mesosphere
>
> Currently two {{process::http::URL}} objects cannot be compared. It would be 
> good to add an equality operator for comparing them. This might require a 
> hostname lookup provided that the {{URL}} object was constructed from 
> {{domain}} and not from {{net::IP}}.
> The other details can be similar to the equality operator semantics of the 
> corresponding Java 7 URL object: 
> https://docs.oracle.com/javase/7/docs/api/java/net/URL.html#equals(java.lang.Object)
> Also, it would also us to get rid of the corresponding {{URL}} object 
> comparison in {{type_utils.cpp}} that just compares if the serialized strings 
> match.
> {code}
> // TODO(bmahler): Leverage process::http::URL for equality.
> bool operator==(const URL& left, const URL& right)
> {
>   return left.SerializeAsString() == right.SerializeAsString();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to