Skip to content

Commit 05cffab

Browse files
authored
[Key Vault] Removed the use of a properties file for error messages in favor of using constants. (Azure#36341)
* Removed the use of a properties file for error messages in favor of using constants from a class in KV Admin. * Removed the use of a properties file for error messages in favor of using constants from a class in KV Certs. * Removed the use of a properties file for error messages in favor of using constants from a class in KV Keys. * Removed the use of a properties file for error messages in favor of using constants from a class in KV Secrets. * Fixed pipeline error.
1 parent 7a9a545 commit 05cffab

File tree

24 files changed

+81
-303
lines changed

24 files changed

+81
-303
lines changed

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlAsyncClient.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ public final class KeyVaultAccessControlAsyncClient {
9090
*/
9191
KeyVaultAccessControlAsyncClient(URL vaultUrl, HttpPipeline httpPipeline,
9292
KeyVaultAdministrationServiceVersion serviceVersion) {
93-
Objects.requireNonNull(vaultUrl,
94-
KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED));
93+
Objects.requireNonNull(vaultUrl, KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED);
9594

9695
this.vaultUrl = vaultUrl.toString();
9796
this.serviceVersion = serviceVersion.getVersion();
@@ -186,8 +185,7 @@ Mono<PagedResponse<KeyVaultRoleDefinition>> listRoleDefinitionsFirstPage(String
186185
Context context) {
187186
try {
188187
Objects.requireNonNull(roleScope,
189-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
190-
"'roleScope'"));
188+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'roleScope'"));
191189

192190
return clientImpl.getRoleDefinitions()
193191
.listSinglePageAsync(vaultUrl, roleScope.toString(), null,
@@ -641,8 +639,7 @@ Mono<PagedResponse<KeyVaultRoleAssignment>> listRoleAssignmentsFirstPage(String
641639
Context context) {
642640
try {
643641
Objects.requireNonNull(roleScope,
644-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
645-
"'roleScope'"));
642+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'roleScope'"));
646643

647644
return clientImpl.getRoleAssignments()
648645
.listForScopeSinglePageAsync(vaultUrl, roleScope.toString(), null,

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClient.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ public final class KeyVaultAccessControlClient {
9292
*/
9393
KeyVaultAccessControlClient(URL vaultUrl, HttpPipeline httpPipeline,
9494
KeyVaultAdministrationServiceVersion serviceVersion) {
95-
Objects.requireNonNull(vaultUrl,
96-
KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED));
95+
Objects.requireNonNull(vaultUrl, KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED);
9796

9897
this.vaultUrl = vaultUrl.toString();
9998
this.serviceVersion = serviceVersion.getVersion();
@@ -193,8 +192,7 @@ PagedResponse<KeyVaultRoleDefinition> listRoleDefinitionsFirstPage(String vaultU
193192
KeyVaultRoleScope roleScope,
194193
Context context) {
195194
Objects.requireNonNull(roleScope,
196-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
197-
"'roleScope'"));
195+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'roleScope'"));
198196
try {
199197
PagedResponse<RoleDefinition> roleDefinitionPagedResponse = clientImpl.getRoleDefinitions()
200198
.listSinglePage(vaultUrl, roleScope.toString(), null,
@@ -605,8 +603,7 @@ PagedResponse<KeyVaultRoleAssignment> listRoleAssignmentsFirstPage(String vaultU
605603
KeyVaultRoleScope roleScope,
606604
Context context) {
607605
Objects.requireNonNull(roleScope,
608-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
609-
"'roleScope'"));
606+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'roleScope'"));
610607
try {
611608
PagedResponse<RoleAssignment> roleAssignmentPagedResponse = clientImpl.getRoleAssignments()
612609
.listForScopeSinglePage(vaultUrl, roleScope.toString(), null,

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClientBuilder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
import com.azure.core.util.Configuration;
2828
import com.azure.core.util.CoreUtils;
2929
import com.azure.core.util.HttpClientOptions;
30+
import com.azure.core.util.ServiceVersion;
3031
import com.azure.core.util.TracingOptions;
3132
import com.azure.core.util.builder.ClientBuilderUtil;
3233
import com.azure.core.util.logging.ClientLogger;
33-
import com.azure.core.util.ServiceVersion;
3434
import com.azure.core.util.tracing.Tracer;
3535
import com.azure.core.util.tracing.TracerProvider;
3636
import com.azure.security.keyvault.administration.implementation.KeyVaultCredentialPolicy;
@@ -174,8 +174,7 @@ private Configuration validateEndpointAndGetConfiguration() {
174174

175175
if (buildEndpoint == null) {
176176
throw LOGGER.logExceptionAsError(
177-
new IllegalStateException(
178-
KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED)));
177+
new IllegalStateException(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED));
179178
}
180179
return buildConfiguration;
181180
}

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAdministrationUtil.java

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -103,26 +103,20 @@ static <E extends HttpResponseException> Response<Void> swallowExceptionForStatu
103103
static RoleAssignmentCreateParameters validateAndGetRoleAssignmentCreateParameters(KeyVaultRoleScope roleScope, String roleDefinitionId, String principalId, String roleAssignmentName) {
104104
validateRoleAssignmentParameters(roleScope, roleAssignmentName);
105105
Objects.requireNonNull(principalId,
106-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
107-
"'principalId'"));
106+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'principalId'"));
108107
Objects.requireNonNull(roleDefinitionId,
109-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
110-
"'roleDefinitionId'"));
108+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'roleDefinitionId'"));
111109

112110
RoleAssignmentProperties roleAssignmentProperties = new RoleAssignmentProperties(roleDefinitionId, principalId);
113111
return new RoleAssignmentCreateParameters(roleAssignmentProperties);
114112
}
115113

116114
static RoleDefinitionCreateParameters validateAndGetRoleDefinitionCreateParameters(SetRoleDefinitionOptions options) {
117-
Objects.requireNonNull(options,
118-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
119-
"'options'"));
115+
Objects.requireNonNull(options, String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'options'"));
120116
Objects.requireNonNull(options.getRoleScope(),
121-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
122-
"'options.getRoleScope()'"));
117+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'options.getRoleScope()'"));
123118
Objects.requireNonNull(options.getRoleDefinitionName(),
124-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
125-
"'options.getRoleDefinitionName()'"));
119+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'options.getRoleDefinitionName()'"));
126120

127121
List<Permission> permissions = null;
128122

@@ -146,21 +140,15 @@ static RoleDefinitionCreateParameters validateAndGetRoleDefinitionCreateParamete
146140
}
147141

148142
static void validateRoleAssignmentParameters(KeyVaultRoleScope roleScope, String roleAssignmentName) {
149-
Objects.requireNonNull(roleScope,
150-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
151-
"'roleScope'"));
143+
Objects.requireNonNull(roleScope, String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'roleScope'"));
152144
Objects.requireNonNull(roleAssignmentName,
153-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
154-
"'roleAssignmentName'"));
145+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'roleAssignmentName'"));
155146
}
156147

157148
static void validateRoleDefinitionParameters(KeyVaultRoleScope roleScope, String roleDefinitionName) {
158-
Objects.requireNonNull(roleScope,
159-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
160-
"'roleScope'"));
149+
Objects.requireNonNull(roleScope, String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'roleScope'"));
161150
Objects.requireNonNull(roleDefinitionName,
162-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
163-
"'roleDefinitionName'"));
151+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'roleDefinitionName'"));
164152
}
165153

166154
@SuppressWarnings("BoundedWildcard")

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupAsyncClient.java

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ Duration getDefaultPollingInterval() {
101101
*/
102102
KeyVaultBackupAsyncClient(URL vaultUrl, HttpPipeline httpPipeline,
103103
KeyVaultAdministrationServiceVersion serviceVersion) {
104-
Objects.requireNonNull(vaultUrl,
105-
KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED));
104+
Objects.requireNonNull(vaultUrl, KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED);
106105

107106
this.vaultUrl = vaultUrl.toString();
108107
this.serviceVersion = serviceVersion.getVersion();
@@ -165,15 +164,14 @@ HttpPipeline getHttpPipeline() {
165164
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
166165
public PollerFlux<KeyVaultBackupOperation, String> beginBackup(String blobStorageUrl, String sasToken) {
167166
if (blobStorageUrl == null) {
168-
throw LOGGER.logExceptionAsError(new NullPointerException(
169-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
170-
"'blobStorageUrl'")));
167+
throw LOGGER.logExceptionAsError(
168+
new NullPointerException(
169+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'blobStorageUrl'")));
171170
}
172171

173172
if (sasToken == null) {
174-
throw LOGGER.logExceptionAsError(new NullPointerException(
175-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
176-
"'sasToken'")));
173+
throw LOGGER.logExceptionAsError(
174+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'sasToken'")));
177175
}
178176

179177
return new PollerFlux<>(getDefaultPollingInterval(),
@@ -329,15 +327,13 @@ private static Mono<PollResponse<KeyVaultBackupOperation>> processBackupOperatio
329327
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
330328
public PollerFlux<KeyVaultRestoreOperation, KeyVaultRestoreResult> beginRestore(String folderUrl, String sasToken) {
331329
if (folderUrl == null) {
332-
throw LOGGER.logExceptionAsError(new NullPointerException(
333-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
334-
"'folderUrl'")));
330+
throw LOGGER.logExceptionAsError(
331+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'folderUrl'")));
335332
}
336333

337334
if (sasToken == null) {
338-
throw LOGGER.logExceptionAsError(new NullPointerException(
339-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
340-
"'sasToken'")));
335+
throw LOGGER.logExceptionAsError(
336+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'sasToken'")));
341337
}
342338

343339
return new PollerFlux<>(getDefaultPollingInterval(),
@@ -490,21 +486,18 @@ static Mono<PollResponse<KeyVaultRestoreOperation>> processRestoreOperationRespo
490486
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
491487
public PollerFlux<KeyVaultSelectiveKeyRestoreOperation, KeyVaultSelectiveKeyRestoreResult> beginSelectiveKeyRestore(String keyName, String folderUrl, String sasToken) {
492488
if (keyName == null) {
493-
throw LOGGER.logExceptionAsError(new NullPointerException(
494-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
495-
"'keyName'")));
489+
throw LOGGER.logExceptionAsError(
490+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'keyName'")));
496491
}
497492

498493
if (folderUrl == null) {
499-
throw LOGGER.logExceptionAsError(new NullPointerException(
500-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
501-
"'folderUrl'")));
494+
throw LOGGER.logExceptionAsError(
495+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'folderUrl'")));
502496
}
503497

504498
if (sasToken == null) {
505-
throw LOGGER.logExceptionAsError(new NullPointerException(
506-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
507-
"'sasToken'")));
499+
throw LOGGER.logExceptionAsError(
500+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'sasToken'")));
508501
}
509502

510503
return new PollerFlux<>(getDefaultPollingInterval(),

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClient.java

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ Duration getDefaultPollingInterval() {
105105
*/
106106
KeyVaultBackupClient(URL vaultUrl, HttpPipeline httpPipeline,
107107
KeyVaultAdministrationServiceVersion serviceVersion) {
108-
Objects.requireNonNull(vaultUrl,
109-
KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED));
108+
Objects.requireNonNull(vaultUrl, KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED);
110109

111110
this.vaultUrl = vaultUrl.toString();
112111
this.serviceVersion = serviceVersion.getVersion();
@@ -170,15 +169,14 @@ public String getVaultUrl() {
170169
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
171170
public SyncPoller<KeyVaultBackupOperation, String> beginBackup(String blobStorageUrl, String sasToken) {
172171
if (blobStorageUrl == null) {
173-
throw LOGGER.logExceptionAsError(new NullPointerException(
174-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
175-
"'blobStorageUrl'")));
172+
throw LOGGER.logExceptionAsError(
173+
new NullPointerException(
174+
String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'blobStorageUrl'")));
176175
}
177176

178177
if (sasToken == null) {
179-
throw LOGGER.logExceptionAsError(new NullPointerException(
180-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
181-
"'sasToken'")));
178+
throw LOGGER.logExceptionAsError(
179+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'sasToken'")));
182180
}
183181

184182
Context context = Context.NONE;
@@ -328,14 +326,12 @@ private static PollResponse<KeyVaultBackupOperation> processBackupOperationRespo
328326
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
329327
public SyncPoller<KeyVaultRestoreOperation, KeyVaultRestoreResult> beginRestore(String folderUrl, String sasToken) {
330328
if (folderUrl == null) {
331-
throw LOGGER.logExceptionAsError(new NullPointerException(
332-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
333-
"'folderUrl'")));
329+
throw LOGGER.logExceptionAsError(
330+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'folderUrl'")));
334331
}
335332
if (sasToken == null) {
336-
throw LOGGER.logExceptionAsError(new NullPointerException(
337-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
338-
"'sasToken'")));
333+
throw LOGGER.logExceptionAsError(
334+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'sasToken'")));
339335
}
340336
Context context = Context.NONE;
341337
return SyncPoller.createPoller(getDefaultPollingInterval(),
@@ -486,21 +482,18 @@ private static PollResponse<KeyVaultRestoreOperation> processRestoreOperationRes
486482
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
487483
public SyncPoller<KeyVaultSelectiveKeyRestoreOperation, KeyVaultSelectiveKeyRestoreResult> beginSelectiveKeyRestore(String keyName, String folderUrl, String sasToken) {
488484
if (keyName == null) {
489-
throw LOGGER.logExceptionAsError(new NullPointerException(
490-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
491-
"'keyName'")));
485+
throw LOGGER.logExceptionAsError(
486+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'keyName'")));
492487
}
493488

494489
if (folderUrl == null) {
495-
throw LOGGER.logExceptionAsError(new NullPointerException(
496-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
497-
"'folderUrl'")));
490+
throw LOGGER.logExceptionAsError(
491+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'folderUrl'")));
498492
}
499493

500494
if (sasToken == null) {
501-
throw LOGGER.logExceptionAsError(new NullPointerException(
502-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
503-
"'sasToken'")));
495+
throw LOGGER.logExceptionAsError(
496+
new NullPointerException(String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'sasToken'")));
504497
}
505498

506499
Context context = Context.NONE;

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultBackupClientBuilder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ private Configuration validateEndpointAndGetBuildConfiguration() {
170170

171171
if (buildEndpoint == null) {
172172
throw LOGGER.logExceptionAsError(
173-
new IllegalStateException(
174-
KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED)));
173+
new IllegalStateException(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED));
175174
}
176175
return buildConfiguration;
177176
}

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultSettingsAsyncClient.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ HttpPipeline getHttpPipeline() {
8989
*/
9090
@ServiceMethod(returns = ReturnType.SINGLE)
9191
public Mono<KeyVaultSetting> updateSetting(KeyVaultSetting setting) {
92-
Objects.requireNonNull(setting,
93-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
94-
"'setting'"));
92+
Objects.requireNonNull(setting, String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'setting'"));
9593

9694
try {
9795
String settingValue = null;
@@ -138,9 +136,7 @@ public Mono<KeyVaultSetting> updateSetting(KeyVaultSetting setting) {
138136
*/
139137
@ServiceMethod(returns = ReturnType.SINGLE)
140138
public Mono<Response<KeyVaultSetting>> updateSettingWithResponse(KeyVaultSetting setting) {
141-
Objects.requireNonNull(setting,
142-
String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
143-
"'setting'"));
139+
Objects.requireNonNull(setting, String.format(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED, "'setting'"));
144140

145141
try {
146142
String settingValue = null;

0 commit comments

Comments
 (0)