mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
修正
This commit is contained in:
parent
f59c4445dc
commit
f6bc9167d2
|
@ -159,7 +159,7 @@ public class LacertaVcsImpl implements LacertaVcs {
|
||||||
ArrayList<VcsLogModel> vcsLogModels = new ArrayList<>();
|
ArrayList<VcsLogModel> vcsLogModels = new ArrayList<>();
|
||||||
|
|
||||||
VcsRevEntity vcsRevEntity = database.vcsRevDao().findById(revId);
|
VcsRevEntity vcsRevEntity = database.vcsRevDao().findById(revId);
|
||||||
ArrayList<VcsLogEntity> vcsLogEntities = getLogInRev(vcsRevEntity);
|
ArrayList<VcsLogEntity> vcsLogEntities = getLogInRevAsync(vcsRevEntity).join(); // TODO-rca: リファクタリング
|
||||||
vcsLogEntities.forEach(vcsLogEntity -> {
|
vcsLogEntities.forEach(vcsLogEntity -> {
|
||||||
VcsLogModel vcsLogModel = new VcsLogModel();
|
VcsLogModel vcsLogModel = new VcsLogModel();
|
||||||
vcsLogModel.setId(vcsLogEntity.id);
|
vcsLogModel.setId(vcsLogEntity.id);
|
||||||
|
@ -201,8 +201,8 @@ public class LacertaVcsImpl implements LacertaVcs {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArrayList<VcsLogEntity> getLogInRev(VcsRevEntity revEntity) {
|
private CompletableFuture<ArrayList<VcsLogEntity>> getLogInRevAsync(VcsRevEntity revEntity) {
|
||||||
return new ArrayList<>(database.vcsLogDao().findByIds(revEntity.logIds));
|
return CompletableFuture.supplyAsync(() -> new ArrayList<>(database.vcsLogDao().findByIds(revEntity.logIds)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user