summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ssh.apache
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2023-07-31 19:51:58 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2023-08-01 14:48:51 +0200
commitba8f3cb1f22f745229ffdb765c9c23892c7300bb (patch)
tree0e8e9f857972537a202c51ec4b11154d00b758cc /org.eclipse.jgit.ssh.apache
parentc353645a09b677644c55daa9dcff7df54529dc04 (diff)
downloadjgit-ba8f3cb1f22f745229ffdb765c9c23892c7300bb.tar.gz
jgit-ba8f3cb1f22f745229ffdb765c9c23892c7300bb.zip
Fix errorprone warning about precedence
The condition looks suspicious, as in case of (hasElement==null && hasNext()) the check will generate a NPE Change-Id: I267f9df6746393d72f5102bd5271441422550968
Diffstat (limited to 'org.eclipse.jgit.ssh.apache')
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java
index 9f1df89e33..eb55ec045b 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java
@@ -466,7 +466,7 @@ public class JGitPublicKeyAuthentication extends UserAuthPublicKey {
@Override
public KeyAgentIdentity next() {
- if (hasElement == null && !hasNext()
+ if ((hasElement == null && !hasNext())
|| !hasElement.booleanValue()) {
throw new NoSuchElementException();
}