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
This commit is contained in:
Han-Wen Nienhuys 2023-07-31 19:51:58 +02:00 committed by Matthias Sohn
parent c353645a09
commit ba8f3cb1f2
1 changed files with 1 additions and 1 deletions

View File

@ -466,7 +466,7 @@ public boolean hasNext() {
@Override
public KeyAgentIdentity next() {
if (hasElement == null && !hasNext()
if ((hasElement == null && !hasNext())
|| !hasElement.booleanValue()) {
throw new NoSuchElementException();
}