"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient5/src/main/java/org/apache/hc/client5/http/auth/UsernamePasswordCredentials.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.

UsernamePasswordCredentials.java  (httpcomponents-client-5.2-src):UsernamePasswordCredentials.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;
/** /**
* Simple {@link Credentials} representation based on a user name / password * Simple {@link Credentials} representation based on a user name / password
* pair. * pair.
* *
* @since 4.0 * @since 4.0
*/ */
@Contract(threading = ThreadingBehavior.IMMUTABLE) @Contract(threading = ThreadingBehavior.IMMUTABLE)
public class UsernamePasswordCredentials implements Credentials, Serializable { public class UsernamePasswordCredentials implements Credentials, Serializable {
skipping to change at line 90 skipping to change at line 90
return this.principal.hashCode(); return this.principal.hashCode();
} }
@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 UsernamePasswordCredentials) { if (o instanceof UsernamePasswordCredentials) {
final UsernamePasswordCredentials that = (UsernamePasswordCredential s) o; final UsernamePasswordCredentials that = (UsernamePasswordCredential s) o;
return LangUtils.equals(this.principal, that.principal); return Objects.equals(this.principal, that.principal);
} }
return false; return false;
} }
@Override @Override
public String toString() { public String toString() {
return this.principal.toString(); return this.principal.toString();
} }
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 2 lines changed or added

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