[errorprone] fix ReturnValueIgnored in PushCertificateStore#next
Change-Id: I8deb7fa702bb973436b7ca21edf3634a087047b7
This commit is contained in:
parent
f3eff2308f
commit
9ba3a521aa
|
@ -159,7 +159,7 @@ public PushCertificate get(String refName) throws IOException {
|
|||
* close resources.
|
||||
*/
|
||||
public Iterable<PushCertificate> getAll(String refName) {
|
||||
return () -> new Iterator<PushCertificate>() {
|
||||
return () -> new Iterator<>() {
|
||||
private final String path = pathName(refName);
|
||||
|
||||
private PushCertificate next;
|
||||
|
@ -219,11 +219,10 @@ public boolean hasNext() {
|
|||
|
||||
@Override
|
||||
public PushCertificate next() {
|
||||
hasNext();
|
||||
PushCertificate n = next;
|
||||
if (n == null) {
|
||||
if (!hasNext()) {
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
PushCertificate n = next;
|
||||
next = null;
|
||||
return n;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue