Skip to content

Commit

Permalink
Fix emptiness check (cadence-workflow#1433)
Browse files Browse the repository at this point in the history
The length of a map is never negative, so the condition as written can never hold.
  • Loading branch information
Max Schaefer authored and dmetzgar committed Feb 5, 2019
1 parent 5686b15 commit 4df61c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/cluster/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func NewMetadata(
defaultArchivalBucket string,
) Metadata {

if len(clusterInitialFailoverVersions) < 0 {
if len(clusterInitialFailoverVersions) == 0 {
panic("Empty initial failover versions for cluster")
} else if len(masterClusterName) == 0 {
panic("Master cluster name is empty")
Expand Down

0 comments on commit 4df61c7

Please sign in to comment.