Skip to content

Commit 089f414

Browse files
committed
Apply Spotless formatting
1 parent a188b7e commit 089f414

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,7 @@ public CompletableFuture<ClientBatchCheckResponse> batchCheck(
752752
boolean allowed = Boolean.TRUE.equals(result.getAllowed());
753753
ClientBatchCheckItem checkItem = correlationIdToCheck.get(key);
754754
var singleResponse =
755-
new ClientBatchCheckSingleResponse(
756-
allowed, checkItem, key, result.getError());
755+
new ClientBatchCheckSingleResponse(allowed, checkItem, key, result.getError());
757756
batchResults.add(singleResponse);
758757
});
759758
responses.addAll(batchResults);
@@ -768,8 +767,7 @@ public CompletableFuture<ClientBatchCheckResponse> batchCheck(
768767
if (failure.get() != null) {
769768
return CompletableFuture.failedFuture(failure.get());
770769
}
771-
return CompletableFuture.completedFuture(
772-
new ClientBatchCheckResponse(new ArrayList<>(responses)));
770+
return CompletableFuture.completedFuture(new ClientBatchCheckResponse(new ArrayList<>(responses)));
773771
} catch (Exception e) {
774772
return CompletableFuture.failedFuture(e);
775773
} finally {

src/test/java/dev/openfga/sdk/api/client/OpenFgaClientTest.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,9 +2076,7 @@ public void batchCheck_withOptions() throws Exception {
20762076
public void batchCheck_rateLimited() {
20772077
// Given
20782078
String postUrl = String.format("https://api.fga.example/stores/%s/batch-check", DEFAULT_STORE_ID);
2079-
mockHttpClient
2080-
.onPost(postUrl)
2081-
.doReturn(429, "{\"code\":\"rate_limited\",\"message\":\"Too Many Requests\"}");
2079+
mockHttpClient.onPost(postUrl).doReturn(429, "{\"code\":\"rate_limited\",\"message\":\"Too Many Requests\"}");
20822080

20832081
ClientBatchCheckItem item = new ClientBatchCheckItem()
20842082
.user(DEFAULT_USER)
@@ -2088,15 +2086,14 @@ public void batchCheck_rateLimited() {
20882086
ClientBatchCheckRequest request = new ClientBatchCheckRequest().checks(List.of(item));
20892087

20902088
// When
2091-
ExecutionException execException =
2092-
assertThrows(ExecutionException.class, () -> fga.batchCheck(request).get());
2089+
ExecutionException execException = assertThrows(
2090+
ExecutionException.class, () -> fga.batchCheck(request).get());
20932091

20942092
// Then
20952093
mockHttpClient.verify().post(postUrl).called(1 + DEFAULT_MAX_RETRIES);
20962094
var exception = assertInstanceOf(FgaApiRateLimitExceededError.class, execException.getCause());
20972095
assertEquals(429, exception.getStatusCode());
2098-
assertEquals(
2099-
"{\"code\":\"rate_limited\",\"message\":\"Too Many Requests\"}", exception.getResponseData());
2096+
assertEquals("{\"code\":\"rate_limited\",\"message\":\"Too Many Requests\"}", exception.getResponseData());
21002097
}
21012098

21022099
/**

0 commit comments

Comments
 (0)