[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.
|
* close resources.
|
||||||
*/
|
*/
|
||||||
public Iterable<PushCertificate> getAll(String refName) {
|
public Iterable<PushCertificate> getAll(String refName) {
|
||||||
return () -> new Iterator<PushCertificate>() {
|
return () -> new Iterator<>() {
|
||||||
private final String path = pathName(refName);
|
private final String path = pathName(refName);
|
||||||
|
|
||||||
private PushCertificate next;
|
private PushCertificate next;
|
||||||
|
@ -219,11 +219,10 @@ public boolean hasNext() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PushCertificate next() {
|
public PushCertificate next() {
|
||||||
hasNext();
|
if (!hasNext()) {
|
||||||
PushCertificate n = next;
|
|
||||||
if (n == null) {
|
|
||||||
throw new NoSuchElementException();
|
throw new NoSuchElementException();
|
||||||
}
|
}
|
||||||
|
PushCertificate n = next;
|
||||||
next = null;
|
next = null;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue