mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +02:00
Use compound return statements for greater readability
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=173451653
This commit is contained in:
parent
eed2e0c45f
commit
d22986a0a3
3 changed files with 4 additions and 16 deletions
|
@ -81,10 +81,7 @@ public class GcsUtils {
|
||||||
logger.warning(e, "Failed to check if GCS file exists");
|
logger.warning(e, "Failed to check if GCS file exists");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (metadata == null) {
|
return metadata != null && metadata.getLength() > 0;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return metadata.getLength() > 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Determines most appropriate {@link GcsFileOptions} based on filename extension. */
|
/** Determines most appropriate {@link GcsFileOptions} based on filename extension. */
|
||||||
|
|
|
@ -140,10 +140,7 @@ public class SignedMarkRevocationList extends ImmutableObject {
|
||||||
/** Returns {@code true} if the SMD ID has been revoked at the given point in time. */
|
/** Returns {@code true} if the SMD ID has been revoked at the given point in time. */
|
||||||
public boolean isSmdRevoked(String smdId, DateTime now) {
|
public boolean isSmdRevoked(String smdId, DateTime now) {
|
||||||
DateTime revoked = revokes.get(checkNotNull(smdId, "smdId"));
|
DateTime revoked = revokes.get(checkNotNull(smdId, "smdId"));
|
||||||
if (revoked == null) {
|
return revoked != null && isBeforeOrAt(revoked, now);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return isBeforeOrAt(revoked, now);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the creation timestamp specified at the top of the SMDRL CSV file. */
|
/** Returns the creation timestamp specified at the top of the SMDRL CSV file. */
|
||||||
|
|
|
@ -130,14 +130,8 @@ public class CloudDnsWriterTest {
|
||||||
stubZone
|
stubZone
|
||||||
.stream()
|
.stream()
|
||||||
.filter(
|
.filter(
|
||||||
resourceRecordSet -> {
|
rs ->
|
||||||
if (resourceRecordSet == null) {
|
rs != null && rs.getName().equals(recordNameCaptor.getValue()))
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return resourceRecordSet
|
|
||||||
.getName()
|
|
||||||
.equals(recordNameCaptor.getValue());
|
|
||||||
})
|
|
||||||
.collect(toImmutableList()));
|
.collect(toImmutableList()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue