From 1777cd515dedf047d45712c859e8d6d129fdad47 Mon Sep 17 00:00:00 2001 From: Ivan Semenov Date: Fri, 31 Jan 2025 14:17:05 +0100 Subject: [PATCH] [github] drop unused method (cherry picked from commit eb5e40e1298c991b132f81e2a2bb37cf7b001d59) GitOrigin-RevId: f39cdd9591ad78d245e08c59b499ce73aa2e9a88 --- .../pullrequest/data/provider/GHPRChangesDataProvider.kt | 4 ---- .../data/provider/GHPRChangesDataProviderImpl.kt | 6 ------ 2 files changed, 10 deletions(-) diff --git a/plugins/github/src/org/jetbrains/plugins/github/pullrequest/data/provider/GHPRChangesDataProvider.kt b/plugins/github/src/org/jetbrains/plugins/github/pullrequest/data/provider/GHPRChangesDataProvider.kt index d5f7da0f4dea..29ac4e706acb 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/pullrequest/data/provider/GHPRChangesDataProvider.kt +++ b/plugins/github/src/org/jetbrains/plugins/github/pullrequest/data/provider/GHPRChangesDataProvider.kt @@ -9,7 +9,6 @@ import git4idea.changes.GitBranchComparisonResult import kotlinx.coroutines.flow.Flow import org.jetbrains.annotations.ApiStatus import org.jetbrains.plugins.github.api.data.GHCommit -import java.util.concurrent.CompletableFuture interface GHPRChangesDataProvider { @@ -24,9 +23,6 @@ interface GHPRChangesDataProvider { suspend fun loadPatchFromMergeBase(commitSha: String, filePath: String): FilePatch? suspend fun signalChangesNeedReload() - - @Deprecated("Please migrate ro coroutines and use loadCommits") - fun loadCommitsFromApi(): CompletableFuture> } @ApiStatus.Internal diff --git a/plugins/github/src/org/jetbrains/plugins/github/pullrequest/data/provider/GHPRChangesDataProviderImpl.kt b/plugins/github/src/org/jetbrains/plugins/github/pullrequest/data/provider/GHPRChangesDataProviderImpl.kt index f69ab1f75243..76ee55b9a7ed 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/pullrequest/data/provider/GHPRChangesDataProviderImpl.kt +++ b/plugins/github/src/org/jetbrains/plugins/github/pullrequest/data/provider/GHPRChangesDataProviderImpl.kt @@ -13,13 +13,11 @@ import kotlinx.coroutines.channels.BufferOverflow import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.asSharedFlow -import kotlinx.coroutines.future.asCompletableFuture import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import org.jetbrains.plugins.github.api.data.GHCommit import org.jetbrains.plugins.github.pullrequest.data.GHPRIdentifier import org.jetbrains.plugins.github.pullrequest.data.service.GHPRChangesService -import java.util.concurrent.CompletableFuture internal class GHPRChangesDataProviderImpl(parentCs: CoroutineScope, private val changesService: GHPRChangesService, @@ -81,10 +79,6 @@ internal class GHPRChangesDataProviderImpl(parentCs: CoroutineScope, return changesService.loadPatch(mergeBase, commitSha).find { it.filePath == filePath } } - @Deprecated("Please migrate ro coroutines and use apiCommitsRequest") - override fun loadCommitsFromApi(): CompletableFuture> = - cs.async { loadCommits() }.asCompletableFuture() - private inner class ChangesDataLoader(parentCs: CoroutineScope, val refs: GHPRBranchesRefs) { private val cs = parentCs.childScope()