Skip to content

Commit e7aa552

Browse files
fix(amazonq): fix unit tests
1 parent 726430b commit e7aa552

File tree

1 file changed

+9
-7
lines changed
  • plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview

1 file changed

+9
-7
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/BrowserConnector.kt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -674,14 +674,16 @@ class BrowserConnector(
674674
}
675675
}
676676

677-
CodeWhispererCodeScanManager.getInstance(project)
678-
.addOnDemandIssues(
679-
mappedFindings,
680-
scannedFiles,
681-
CodeWhispererConstants.CodeAnalysisScope.AGENTIC
682-
)
683-
CodeWhispererCodeScanManager.getInstance(project).showCodeScanUI()
684677

678+
if (mappedFindings.isNotEmpty()) {
679+
CodeWhispererCodeScanManager.getInstance(project)
680+
.addOnDemandIssues(
681+
mappedFindings,
682+
scannedFiles,
683+
CodeWhispererConstants.CodeAnalysisScope.AGENTIC
684+
)
685+
CodeWhispererCodeScanManager.getInstance(project).showCodeScanUI()
686+
}
685687
// Remove findings messages from response payload
686688
val rootNode = serializer.objectMapper.readTree(responsePayload) as ObjectNode
687689
rootNode.remove("additionalMessages")

0 commit comments

Comments
 (0)