Skip to content

Commit 24472e6

Browse files
authored
Fix possible NPE in CSFLE executor (#2467)
* Fix NPE in CSFLE executor * Incorporate review feedback
1 parent 044b04f commit 24472e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Confluent.SchemaRegistry.Encryption/FieldEncryptionExecutor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ public override void Configure(IEnumerable<KeyValuePair<string, string>> config,
5050
{
5151
if (Configs != null)
5252
{
53-
if (!new HashSet<KeyValuePair<string, string>>(Configs).SetEquals(config))
53+
if (config != null && !new HashSet<KeyValuePair<string, string>>(Configs).SetEquals(config))
5454
{
5555
throw new RuleException("FieldEncryptionExecutor already configured");
5656
}
5757
}
5858
else
5959
{
60-
Configs = config;
60+
Configs = config ?? Array.Empty<KeyValuePair<string, string>>();
6161
}
6262

6363
if (Client == null)

0 commit comments

Comments
 (0)