This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
The following commit(s) were added to refs/heads/master by this push: new 9efa7bfc Use Objects.hash() 9efa7bfc is described below commit 9efa7bfc76fe574891e75ad9d61810e33e9a3471 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sat Jan 14 08:16:51 2023 -0500 Use Objects.hash() --- .../org/apache/commons/vfs2/provider/sftp/BytesIdentityInfo.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/BytesIdentityInfo.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/BytesIdentityInfo.java index 419ecf1a..d74ff65a 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/BytesIdentityInfo.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/BytesIdentityInfo.java @@ -18,6 +18,7 @@ package org.apache.commons.vfs2.provider.sftp; import java.util.Arrays; +import java.util.Objects; import com.jcraft.jsch.JSch; import com.jcraft.jsch.JSchException; @@ -116,11 +117,6 @@ public class BytesIdentityInfo implements IdentityProvider { @Override public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + Arrays.hashCode(passphrase); - result = prime * result + Arrays.hashCode(privateKey); - result = prime * result + Arrays.hashCode(publicKey); - return result; + return Objects.hash(Arrays.hashCode(passphrase), Arrays.hashCode(privateKey), Arrays.hashCode(publicKey)); } }