Skip to content

Commit bcb669d

Browse files
jimmyjamesclaude
andcommitted
fix: add null validation for telemetry parameter
Add null checks for the telemetry parameter in the new ApiExecutor and HttpRequestAttempt constructors, consistent with existing validation of other parameters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1fa39ff commit bcb669d

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/dev/openfga/sdk/api/client/ApiExecutor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public ApiExecutor(ApiClient apiClient, Configuration configuration, Telemetry t
5656
if (configuration == null) {
5757
throw new IllegalArgumentException("Configuration cannot be null");
5858
}
59+
if (telemetry == null) {
60+
throw new IllegalArgumentException("Telemetry cannot be null");
61+
}
5962
this.apiClient = apiClient;
6063
this.configuration = configuration;
6164
this.telemetry = telemetry;

src/main/java/dev/openfga/sdk/api/client/HttpRequestAttempt.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public HttpRequestAttempt(
4949
Telemetry telemetry)
5050
throws FgaInvalidParameterException {
5151
assertParamExists(configuration.getMaxRetries(), "maxRetries", "Configuration");
52+
if (telemetry == null) {
53+
throw new IllegalArgumentException("Telemetry cannot be null");
54+
}
5255
this.apiClient = apiClient;
5356
this.configuration = configuration;
5457
this.name = name;

0 commit comments

Comments
 (0)