リファクタリング

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

View File

@ -197,10 +197,8 @@ public class LacertaVcsImpl implements LacertaVcs {
private ArrayList<VcsLogEntity> getLogInRevs(ArrayList<VcsRevEntity> vcsRevEntities){
ArrayList<VcsLogEntity> vcsLogEntities = new ArrayList<>();
vcsRevEntities.forEach(vcsRevEntity -> {
vcsRevEntity.logIds.forEach(logId -> {
VcsLogEntity vcsLogEntity = database.vcsLogDao().findById(logId);
vcsLogEntities.add(vcsLogEntity);
});
List<String> logIds = new ArrayList<>(vcsRevEntity.logIds);
vcsLogEntities.addAll(database.vcsLogDao().findByIds(logIds));
});
return vcsLogEntities;