Fix a few Java 9+isms and ignore IML files (#973)

This allows us to run tests in IDEA which is significantly quicker. We
shouldn't be using anything past Java 8 anyway since that's what GAE
runs with.
This commit is contained in:
gbrodman
2021-02-25 14:59:00 -05:00
committed by GitHub
parent d73a15c697
commit cc69d63802
4 changed files with 10 additions and 9 deletions
@@ -140,11 +140,13 @@ public class ReplayCommitLogsToSqlAction implements Runnable {
transaction.stream()
.sorted(ReplayCommitLogsToSqlAction::compareByWeight)
.forEach(
versionedEntity ->
versionedEntity
.getEntity()
.ifPresentOrElse(
this::handleEntityPut, () -> handleEntityDelete(versionedEntity)));
versionedEntity -> {
if (versionedEntity.getEntity().isPresent()) {
handleEntityPut(versionedEntity.getEntity().get());
} else {
handleEntityDelete(versionedEntity);
}
});
}
private void handleEntityPut(Entity entity) {
@@ -151,7 +151,7 @@ public class BackfillRegistryLocksCommand extends ConfirmingCommand
return domains.stream()
.filter(d -> d.getDeletionTime().isAfter(now))
.filter(d -> d.getStatusValues().containsAll(REGISTRY_LOCK_STATUSES))
.filter(d -> RegistryLockDao.getMostRecentByRepoId(d.getRepoId()).isEmpty())
.filter(d -> !RegistryLockDao.getMostRecentByRepoId(d.getRepoId()).isPresent())
.collect(toImmutableList());
}
}