"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient5/src/main/java/org/apache/hc/client5/http/auth/BasicUserPrincipal.java" between
httpcomponents-client-5.2-src.tar.gz and httpcomponents-client-5.2.1-src.tar.gz

About: Apache HttpComponents Client provides reusable components for client-side authentication, HTTP state management, and HTTP connection management. Java sources.

BasicUserPrincipal.java  (httpcomponents-client-5.2-src):BasicUserPrincipal.java  (httpcomponents-client-5.2.1-src)
skipping to change at line 31 skipping to change at line 31
* This software consists of voluntary contributions made by many * This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more * individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see * information on the Apache Software Foundation, please see
* <http://www.apache.org/>. * <http://www.apache.org/>.
* *
*/ */
package org.apache.hc.client5.http.auth; package org.apache.hc.client5.http.auth;
import java.io.Serializable; import java.io.Serializable;
import java.security.Principal; import java.security.Principal;
import java.util.Objects;
import org.apache.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.Contract;
import org.apache.hc.core5.annotation.ThreadingBehavior; import org.apache.hc.core5.annotation.ThreadingBehavior;
import org.apache.hc.core5.util.Args; import org.apache.hc.core5.util.Args;
import org.apache.hc.core5.util.LangUtils; import org.apache.hc.core5.util.LangUtils;
/** /**
* Basic username based principal representation. * Basic username based principal representation.
* *
* @since 4.0 * @since 4.0
skipping to change at line 74 skipping to change at line 75
return hash; return hash;
} }
@Override @Override
public boolean equals(final Object o) { public boolean equals(final Object o) {
if (this == o) { if (this == o) {
return true; return true;
} }
if (o instanceof BasicUserPrincipal) { if (o instanceof BasicUserPrincipal) {
final BasicUserPrincipal that = (BasicUserPrincipal) o; final BasicUserPrincipal that = (BasicUserPrincipal) o;
return LangUtils.equals(this.username, that.username); return Objects.equals(this.username, that.username);
} }
return false; return false;
} }
@Override @Override
public String toString() { public String toString() {
final StringBuilder buffer = new StringBuilder(); final StringBuilder buffer = new StringBuilder();
buffer.append("[principal: "); buffer.append("[principal: ");
buffer.append(this.username); buffer.append(this.username);
buffer.append("]"); buffer.append("]");
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)