Open
Conversation
maxkoshevoi
commented
Aug 21, 2024
Comment on lines
+241
to
+246
| Select(featureFlagFilter!, labelFilter!); | ||
|
|
||
| _multiKeyWatchers.AppendUnique(new KeyValueWatcher | ||
| { | ||
| Key = featureFlagFilter, | ||
| Label = labelFilter, | ||
| Key = featureFlagFilter!, | ||
| Label = labelFilter!, |
Author
There was a problem hiding this comment.
Here there's no check that featureFlagSelector.KeyFilter and featureFlagSelector.LabelFilter are not null. They might be since featureFlagSelector could be initialized with SnapshotName
maxkoshevoi
commented
Aug 21, 2024
| } | ||
|
|
||
| Uri currentEndpoint = _configClientManager.GetEndpointForClient(clientEnumerator.Current); | ||
| Uri currentEndpoint = _configClientManager.GetEndpointForClient(clientEnumerator.Current)!; |
Author
There was a problem hiding this comment.
IConfigurationClientManager.GetEndpointForClient can return null if it doesn't find the client, but everywhere it's used return value is never checked for null (here's an example)
maxkoshevoi
commented
Aug 21, 2024
| case JsonValueKind.False: | ||
| case JsonValueKind.Null: | ||
| _data.Add(new KeyValuePair<string, string>(_currentPath, element.ToString())); | ||
| _data.Add(new KeyValuePair<string, string?>(_currentPath!, element.ToString())); |
Author
There was a problem hiding this comment.
_currentPath can be null here if we never execute EnterContext or ExitContext
maxkoshevoi
commented
Aug 21, 2024
|
|
||
| var configClient = _credential == null | ||
| ? new ConfigurationClient(ConnectionStringUtils.Build(targetEndpoint, _id, _secret), _clientOptions) | ||
| ? new ConfigurationClient(ConnectionStringUtils.Build(targetEndpoint, _id!, _secret!), _clientOptions) |
Author
There was a problem hiding this comment.
If ConfigurationClientManager is initialized using the constructor with endpoints, _id and _secret will be null here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #300
Notes:
KeyValueSelectorcan ether be initialized with key and label, or snapshot so I introduced two constructors to reflect that