Skip to content

Commit f5d161e

Browse files
Will-ShaoHuarlievanliu048
authored
fix null profile name not handled and throw NPE (#5541)
* fix empty profile name provided as the response * Update plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/profile/QRegionProfileManager.kt Co-authored-by: Richard Li <742829+rli@users.noreply.github.com> --------- Co-authored-by: Richard Li <742829+rli@users.noreply.github.com> Co-authored-by: evanliu048 <evannliu@amazon.com>
1 parent e2c709c commit f5d161e

File tree

1 file changed

+1
-1
lines changed
  • plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/profile

1 file changed

+1
-1
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/profile/QRegionProfileManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class QRegionProfileManager : PersistentStateComponent<QProfileState>, Disposabl
7474
.awsClient<CodeWhispererRuntimeClient>()
7575
.listAvailableProfilesPaginator {}
7676
.profiles()
77-
.map { p -> QRegionProfile(arn = p.arn(), profileName = p.profileName()) }
77+
.map { p -> QRegionProfile(arn = p.arn(), profileName = p.profileName() ?: "<no name>") }
7878
}
7979
if (mappedProfiles.size == 1) {
8080
switchProfile(project, mappedProfiles.first(), intent = QProfileSwitchIntent.Update)

0 commit comments

Comments
 (0)