Skip to content

Commit fda4bb3

Browse files
committed
Lint
1 parent 3a6ea64 commit fda4bb3

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

solid/src/main/java/com/inrupt/client/solid/SolidClient.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,11 @@
2222

2323
import com.inrupt.client.*;
2424
import com.inrupt.client.auth.Session;
25-
import com.inrupt.client.spi.JsonService;
26-
import com.inrupt.client.spi.ServiceProvider;
2725

2826
import java.io.ByteArrayInputStream;
2927
import java.io.IOException;
3028
import java.io.InputStream;
3129
import java.net.URI;
32-
import java.nio.charset.StandardCharsets;
3330
import java.util.Collections;
3431
import java.util.List;
3532
import java.util.Map;
@@ -127,7 +124,10 @@ public <T extends Resource> CompletionStage<T> read(final URI identifier, final
127124
final Request request = builder.build();
128125
return client.send(
129126
request,
130-
Response.BodyHandlers.throwOnError(Response.BodyHandlers.ofByteArray(), (r) -> isSuccess(r.statusCode()))
127+
Response.BodyHandlers.throwOnError(
128+
Response.BodyHandlers.ofByteArray(),
129+
(r) -> isSuccess(r.statusCode())
130+
)
131131
).thenApply(response -> {
132132
final String contentType = response.headers().firstValue(CONTENT_TYPE)
133133
.orElse("application/octet-stream");
@@ -157,7 +157,7 @@ public <T extends Resource> CompletionStage<T> read(final URI identifier, final
157157
if (exception instanceof ClientHttpException) {
158158
throw SolidClientException.handle((ClientHttpException) exception);
159159
}
160-
throw new RuntimeException("Something went wrong reading "+request.uri(), exception);
160+
throw new RuntimeException("Something went wrong reading " + request.uri(), exception);
161161
});
162162
}
163163

@@ -277,18 +277,18 @@ public <T extends Resource> CompletionStage<Void> delete(final T resource, final
277277
headers.firstValue(USER_AGENT).ifPresent(agent -> builder.setHeader(USER_AGENT, agent));
278278

279279
return client.send(
280-
builder.build(),
281-
Response.BodyHandlers.throwOnError(
282-
Response.BodyHandlers.ofByteArray(),
283-
(r) -> isSuccess(r.statusCode())
284-
)
285-
).exceptionally(exception -> {
280+
builder.build(),
281+
Response.BodyHandlers.throwOnError(
282+
Response.BodyHandlers.ofByteArray(),
283+
(r) -> isSuccess(r.statusCode())
284+
)
285+
).exceptionally(exception -> {
286286
if (exception instanceof ClientHttpException) {
287287
throw SolidClientException.handle((ClientHttpException) exception);
288288
}
289-
throw new RuntimeException("Something went wrong reading "+resource.getIdentifier(), exception);
289+
throw new RuntimeException("Something went wrong reading " + resource.getIdentifier(), exception);
290290
// FIXME I don't understand why the following is required.
291-
}).thenAccept(o -> {});
291+
}).thenAccept(o -> { /* no-op */ });
292292
}
293293

294294
/**

solid/src/main/java/com/inrupt/client/solid/SolidClientException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static SolidClientException handle(
9191
}
9292
}
9393

94-
public static SolidClientException handle(final ClientHttpException exception){
94+
public static SolidClientException handle(final ClientHttpException exception) {
9595
switch (exception.getStatusCode()) {
9696
case BadRequestException.STATUS_CODE:
9797
return (BadRequestException) exception;

0 commit comments

Comments
 (0)