From 75ae3e06b196e337f8f61d0ddd573268359d048a Mon Sep 17 00:00:00 2001 From: Denys Zhuravel Date: Thu, 2 Aug 2018 19:06:29 +0200 Subject: [PATCH] throw on empty environmentVariableName --- GitHubJwt/EnvironmentVariablePrivateKeySource.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GitHubJwt/EnvironmentVariablePrivateKeySource.cs b/GitHubJwt/EnvironmentVariablePrivateKeySource.cs index 1f5c40d..e0bce13 100644 --- a/GitHubJwt/EnvironmentVariablePrivateKeySource.cs +++ b/GitHubJwt/EnvironmentVariablePrivateKeySource.cs @@ -9,6 +9,11 @@ public class EnvironmentVariablePrivateKeySource : IPrivateKeySource public EnvironmentVariablePrivateKeySource(string environmentVariableName) { + if (string.IsNullOrEmpty(environmentVariableName)) + { + throw new ArgumentNullException(nameof(environmentVariableName)); + } + this.environmentVariableName = environmentVariableName; }