リファクタリング

This commit is contained in:
r-ca 2024-01-24 17:48:00 +09:00
parent daab41620f
commit b58e80f7ea
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -195,13 +195,11 @@ public class LacertaVcsImpl implements LacertaVcs {
} }
private ArrayList<VcsLogEntity> getLogInRevs(ArrayList<VcsRevEntity> vcsRevEntities){ private ArrayList<VcsLogEntity> getLogInRevs(ArrayList<VcsRevEntity> vcsRevEntities){
ArrayList<VcsLogEntity> vcsLogEntities = new ArrayList<>(); List<String> logIds = new ArrayList<>();
vcsRevEntities.forEach(vcsRevEntity -> { vcsRevEntities.forEach(vcsRevEntity -> {
List<String> logIds = new ArrayList<>(vcsRevEntity.logIds); logIds.addAll(vcsRevEntity.logIds);
vcsLogEntities.addAll(database.vcsLogDao().findByIds(logIds));
}); });
return new ArrayList<>(database.vcsLogDao().findByIds(logIds));
return vcsLogEntities;
} }
private ArrayList<VcsLogEntity> getLogInRev(VcsRevEntity revEntity) { private ArrayList<VcsLogEntity> getLogInRev(VcsRevEntity revEntity) {