Skip to content

Commit 3806ea5

Browse files
committed
remove unnecessary check
1 parent 7827a3c commit 3806ea5

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/main/java/com/blackduck/integration/detect/lifecycle/run/step/CommonScanStepRunner.java

+4-10
Original file line numberDiff line numberDiff line change
@@ -78,24 +78,18 @@ public UUID performCommonUpload(NameVersion projectNameVersion, BlackDuckRunData
7878
String uploadUrl = scanCreationResponse.getUploadUrl();
7979
UUID scanId = UUID.fromString(scanCreationResponse.getScanId());
8080

81-
boolean isFallback = false;
82-
8381
if (StringUtils.isNotEmpty(uploadUrl)) {
8482
if (isAccessible(uploadUrl)) {
85-
// This is a SCASS capable server server and SCASS is enabled.
83+
// This is a SCASS capable server server, SCASS is enabled, and we can access the upload URL.
8684
ScassScanStepRunner scassScanStepRunner = createScassScanStepRunner(blackDuckRunData);
8785
scassScanStepRunner.runScassScan(Optional.of(initResult.getFileToUpload()), scanCreationResponse);
8886

8987
return scanId;
9088
} else {
91-
isFallback = true;
89+
// If we can't access the SCASS uplaod URL, we create a new scanId so we can try the BDBA flow.
90+
// Note: as of 2025.1.1 there is no endpoint to cancel a SCASS scan.
91+
scanId = createFallbackScanId(operationRunner, scanType, projectNameVersion, codeLocationName, scanFile.get().length(), blackDuckRunData);
9292
}
93-
}
94-
95-
if (isFallback) {
96-
// We already tried SCASS and failed, create a new scanId so we can try the BDBA flow.
97-
// Note: as of 2025.1.1 there is no endpoint to cancel a SCASS scan.
98-
scanId = createFallbackScanId(operationRunner, scanType, projectNameVersion, codeLocationName, scanFile.get().length(), blackDuckRunData);
9993
}
10094

10195
// This is a SCASS capable server server but SCASS is not enabled or the GCP URL is inaccessible.

0 commit comments

Comments
 (0)