Skip to content

Commit

Permalink
Merge pull request #146 from atschabu/fixversionsnpe
Browse files Browse the repository at this point in the history
fix(credentials) #145: NPE on unknown version
  • Loading branch information
lilgallon authored Jan 21, 2025
2 parents 210ff9d + 97ec41a commit d47df7d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ open class CredentialsClientService(

// Get available versions and pick latest mutual
val latestMutualVersion = availableServerVersions
.sortedByDescending { clientVersion -> parseVersionNumber(clientVersion.version)!!.index }
.sortedByDescending { clientVersion -> parseVersionNumber(clientVersion.version)?.index ?: 0 }
.firstOrNull { serverVersion ->
availableClientVersionNumbers
.any { clientVersionNumber -> serverVersion.version == clientVersionNumber.value }
Expand Down

0 comments on commit d47df7d

Please sign in to comment.