From 826f8928d12ce594a004ae93c7aed1b8e48e033b Mon Sep 17 00:00:00 2001 From: r-ca Date: Wed, 24 Jan 2024 18:06:10 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/vcs/impl/LacertaVcsImpl.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java b/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java index 4e6d3d56..a2a47081 100644 --- a/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java +++ b/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java @@ -185,7 +185,6 @@ public class LacertaVcsImpl implements LacertaVcs { } vcsRevEntitiesBeforeTarget.add(vcsRevEntity); }); - return vcsRevEntitiesBeforeTarget; }); } @@ -197,12 +196,18 @@ public class LacertaVcsImpl implements LacertaVcs { logIds.addAll(vcsRevEntity.logIds); }); // TODO-rca: ソートしないといけないかも(順番が保証されているわけではない + 順番が変わるとほぼ確実に壊れる) - return new ArrayList<>(database.vcsLogDao().findByIds(logIds)); + ArrayList vcsLogEntities = new ArrayList<>(database.vcsLogDao().findByIds(logIds)); + logger.debug(TAG, "getLogInRevsAsync finished\nResult size: " + vcsLogEntities.size()); + return vcsLogEntities; }); } private CompletableFuture> getLogInRevAsync(VcsRevEntity revEntity) { - return CompletableFuture.supplyAsync(() -> new ArrayList<>(database.vcsLogDao().findByIds(revEntity.logIds))); + return CompletableFuture.supplyAsync(() -> { + ArrayList vcsLogEntities = new ArrayList<>(database.vcsLogDao().findByIds(revEntity.logIds)); + logger.debug(TAG, "getLogInRevAsync finished\nResult size: " + vcsLogEntities.size()); + return vcsLogEntities; + }); } @Override @@ -210,7 +215,6 @@ public class LacertaVcsImpl implements LacertaVcs { return CompletableFuture.supplyAsync(() -> { logger.debug(TAG, "getDocumentPagePathListRev"); ArrayList vcsLogEntities = getRevBeforeTargetIdAsync(revId).thenCompose(this::getLogInRevsAsync).join(); - logger.debug(TAG, "Query finished\nSize: " + vcsLogEntities.size()); // finalで宣言しないとLambda式内で扱えないので final ArrayList[] fileNameList = new ArrayList[]{new ArrayList<>()};