From f59c4445dcea41dcf9ea9bd7003adb2f47d99760 Mon Sep 17 00:00:00 2001 From: r-ca Date: Wed, 24 Jan 2024 17:56:44 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E5=90=8D?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 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 9e4ee843..ed81a493 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 @@ -1,22 +1,15 @@ package one.nem.lacerta.vcs.impl; -import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import java.util.UUID; import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; - -import javax.inject.Inject; import dagger.assisted.Assisted; import dagger.assisted.AssistedInject; import one.nem.lacerta.model.VcsLogModel; import one.nem.lacerta.model.VcsRevModel; -import one.nem.lacerta.model.document.DocumentDetail; -import one.nem.lacerta.model.document.DocumentMeta; import one.nem.lacerta.source.database.LacertaDatabase; -import one.nem.lacerta.source.database.entity.DocumentEntity; import one.nem.lacerta.source.database.entity.VcsLogEntity; import one.nem.lacerta.source.database.entity.VcsRevEntity; import one.nem.lacerta.utils.LacertaLogger; @@ -197,7 +190,7 @@ public class LacertaVcsImpl implements LacertaVcs { }); } - private CompletableFuture> getLogInRevs(ArrayList vcsRevEntities){ + private CompletableFuture> getLogInRevsAsync(ArrayList vcsRevEntities){ return CompletableFuture.supplyAsync(() -> { List logIds = new ArrayList<>(); vcsRevEntities.forEach(vcsRevEntity -> { @@ -216,7 +209,7 @@ public class LacertaVcsImpl implements LacertaVcs { public CompletableFuture> getDocumentPagePathListRev(String revId) { return CompletableFuture.supplyAsync(() -> { logger.debug(TAG, "getDocumentPagePathListRev"); - ArrayList vcsLogEntities = getRevBeforeTargetIdAsync(revId).thenCompose(this::getLogInRevs).join(); + ArrayList vcsLogEntities = getRevBeforeTargetIdAsync(revId).thenCompose(this::getLogInRevsAsync).join(); // finalで宣言しないとLambda式内で扱えないので final ArrayList[] fileNameList = new ArrayList[]{new ArrayList<>()};