Skip to content

Commit 3ebdee5

Browse files
remove redundant exceptionally block
1 parent 4539c3b commit 3ebdee5

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

backend/rpc-impl/src/main/java/org/sonarsource/sonarlint/core/rpc/impl/AnalysisRpcServiceDelegate.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
*/
2020
package org.sonarsource.sonarlint.core.rpc.impl;
2121

22-
import java.util.List;
2322
import java.util.Map;
2423
import java.util.Set;
2524
import java.util.concurrent.CancellationException;
@@ -145,12 +144,6 @@ public CompletableFuture<AnalyzeFilesResponse> analyzeFilesAndTrack(AnalyzeFiles
145144
return requestFutureAsync(cancelChecker -> getBean(AnalysisService.class)
146145
.scheduleAnalysis(params.getConfigurationScopeId(), params.getAnalysisId(), Set.copyOf(params.getFilesToAnalyze()),
147146
params.getExtraProperties(), params.isShouldFetchServerIssues(), TriggerType.FORCED_WITH_EXCLUSIONS, cancelChecker)
148-
.exceptionally(exception -> {
149-
if (exception instanceof CompletionException || exception instanceof CancellationException) {
150-
throw new ResponseErrorException(new ResponseError(ResponseErrorCode.RequestCancelled, "Analysis was cancelled", null));
151-
}
152-
return null;
153-
})
154147
.thenApply(analysisResults -> {
155148
if (analysisResults == null) {
156149
throw new ResponseErrorException(new ResponseError(ResponseErrorCode.RequestCancelled, "Analysis was cancelled", null));

0 commit comments

Comments
 (0)