From e9ac5c939c0c28d946af9b188c83578f190e5dac Mon Sep 17 00:00:00 2001 From: Edgar Asatryan Date: Mon, 6 Jun 2022 21:05:50 +0400 Subject: [PATCH] chore: Reformat code. --- .../io/github/nstdio/http/ext/CacheEntryMetadata.java | 8 +++++++- .../io/github/nstdio/http/ext/ExtendedHttpClient.java | 8 +++++--- .../java/io/github/nstdio/http/ext/FutureHandler.java | 6 +++--- src/main/java/io/github/nstdio/http/ext/Predicates.java | 5 +++-- .../io/github/nstdio/http/ext/spi/CompressionFactory.java | 2 ++ 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/main/java/io/github/nstdio/http/ext/CacheEntryMetadata.java b/src/main/java/io/github/nstdio/http/ext/CacheEntryMetadata.java index 4b9ff03..c471c11 100644 --- a/src/main/java/io/github/nstdio/http/ext/CacheEntryMetadata.java +++ b/src/main/java/io/github/nstdio/http/ext/CacheEntryMetadata.java @@ -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; diff --git a/src/main/java/io/github/nstdio/http/ext/ExtendedHttpClient.java b/src/main/java/io/github/nstdio/http/ext/ExtendedHttpClient.java index 4a3fdfb..f7f84bd 100644 --- a/src/main/java/io/github/nstdio/http/ext/ExtendedHttpClient.java +++ b/src/main/java/io/github/nstdio/http/ext/ExtendedHttpClient.java @@ -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) { @@ -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) { diff --git a/src/main/java/io/github/nstdio/http/ext/FutureHandler.java b/src/main/java/io/github/nstdio/http/ext/FutureHandler.java index 6f10876..34bdebf 100644 --- a/src/main/java/io/github/nstdio/http/ext/FutureHandler.java +++ b/src/main/java/io/github/nstdio/http/ext/FutureHandler.java @@ -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 The response body type. */ diff --git a/src/main/java/io/github/nstdio/http/ext/Predicates.java b/src/main/java/io/github/nstdio/http/ext/Predicates.java index 8739c91..7820063 100644 --- a/src/main/java/io/github/nstdio/http/ext/Predicates.java +++ b/src/main/java/io/github/nstdio/http/ext/Predicates.java @@ -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() { diff --git a/src/main/java/io/github/nstdio/http/ext/spi/CompressionFactory.java b/src/main/java/io/github/nstdio/http/ext/spi/CompressionFactory.java index 0c905e8..d6c2e2b 100644 --- a/src/main/java/io/github/nstdio/http/ext/spi/CompressionFactory.java +++ b/src/main/java/io/github/nstdio/http/ext/spi/CompressionFactory.java @@ -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}.