Skip to content

Commit

Permalink
chore: Reformat code.
Browse files Browse the repository at this point in the history
  • Loading branch information
nstdio committed Jun 6, 2022
1 parent c5e10ae commit e9ac5c9
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
import java.util.Optional;
import java.util.concurrent.TimeUnit;

import static io.github.nstdio.http.ext.Headers.*;
import static io.github.nstdio.http.ext.Headers.HEADER_DATE;
import static io.github.nstdio.http.ext.Headers.HEADER_ETAG;
import static io.github.nstdio.http.ext.Headers.HEADER_EXPIRES;
import static io.github.nstdio.http.ext.Headers.HEADER_LAST_MODIFIED;
import static io.github.nstdio.http.ext.Headers.HEADER_WARNING;
import static io.github.nstdio.http.ext.Headers.parseInstant;
import static io.github.nstdio.http.ext.Headers.toRFC1123;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.stream.Collectors.toUnmodifiableList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ public Builder authenticator(Authenticator authenticator) {
* Sets the cache.
*
* @param cache The cache. Use {@link Cache#noop()} instead of {@code null}.
*
* @return builder itself.
*/
public Builder cache(Cache cache) {
Expand All @@ -335,11 +336,12 @@ public Builder cache(Cache cache) {
}

/**
* Sets the flag whether automatically decompress response or not. If set to {@code true} requests made by
* created client will be enhanced with {@code Accept-Encoding} header and will decompress response body if
* appropriate response headers found.
* Sets the flag whether automatically decompress response or not. If set to {@code true} requests made by created
* client will be enhanced with {@code Accept-Encoding} header and will decompress response body if appropriate
* response headers found.
*
* @param transparentEncoding Apply transparent encoding or not.
*
* @return builder itself.
*/
public Builder transparentEncoding(boolean transparentEncoding) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/github/nstdio/http/ext/FutureHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import static io.github.nstdio.http.ext.Throwables.sneakyThrow;

/**
* The function to pass to {@link java.util.concurrent.CompletableFuture#handleAsync(BiFunction)} or {@link
* java.util.concurrent.CompletableFuture#handle(BiFunction)}. The type alias and handy chaining for other {@code
* FutureHandler}s.
* The function to pass to {@link java.util.concurrent.CompletableFuture#handleAsync(BiFunction)} or
* {@link java.util.concurrent.CompletableFuture#handle(BiFunction)}. The type alias and handy chaining for other
* {@code FutureHandler}s.
*
* @param <T> The response body type.
*/
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/io/github/nstdio/http/ext/Predicates.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
import java.util.function.Predicate;

/**
* The request/response predicates to use with {@link io.github.nstdio.http.ext.Cache.InMemoryCacheBuilder#requestFilter(Predicate)}
* and {@link io.github.nstdio.http.ext.Cache.InMemoryCacheBuilder#responseFilter(Predicate)}.
* The request/response predicates to use with
* {@link io.github.nstdio.http.ext.Cache.InMemoryCacheBuilder#requestFilter(Predicate)} and
* {@link io.github.nstdio.http.ext.Cache.InMemoryCacheBuilder#responseFilter(Predicate)}.
*/
public final class Predicates {
private Predicates() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public interface CompressionFactory {
*
* @param in The input stream.
* @param type One of {@link #supported()} types.
*
* @return Wrapped input stream.
*
* @throws IOException When {@code in} does not represent a supported compression type or I/O error
* occures.
* @throws IllegalArgumentException When type {@link #supported()} does not contain {@code type}.
Expand Down

0 comments on commit e9ac5c9

Please sign in to comment.