Skip to content

Commit b129688

Browse files
authored
Minor cleanups (#1899)
1 parent eca99c5 commit b129688

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+152
-154
lines changed

client/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public State onHeadersWritten() {
9898
}
9999

100100
/**
101-
* Invoked when the content (a {@link File}, {@link String} or
101+
* Invoked when the content (a {@link File}, {@link String}) or
102102
* {@link InputStream} has been fully written on the I/O socket.
103103
*
104104
* @return a {@link AsyncHandler.State} telling to CONTINUE

client/src/main/java/org/asynchttpclient/AsyncHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
* <p>
5555
* Do NOT perform any blocking operations in any of these methods. A typical example would be trying to send another
5656
* request and calling get() on its future.
57-
* There's a chance you might end up in a dead lock.
57+
* There's a chance you might end up in a deadlock.
5858
* If you really need to perform a blocking operation, execute it in a different dedicated thread pool.
5959
*
6060
* @param <T> Type of object returned by the {@link Future#get}
@@ -151,7 +151,7 @@ default void onHostnameResolutionFailure(String name, Throwable cause) {
151151
/**
152152
* Notify the callback when trying to open a new connection.
153153
* <p>
154-
* Might be called several times if the name was resolved to multiple addresses and we failed to connect to the first(s) one(s).
154+
* Might be called several times if the name was resolved to multiple addresses, and we failed to connect to the first(s) one(s).
155155
*
156156
* @param remoteAddress the address we try to connect to
157157
*/

client/src/main/java/org/asynchttpclient/AsyncHttpClient.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
* The {@link AsyncCompletionHandler#onCompleted(Response)} method will be invoked once the http response has been fully read.
6767
* The {@link Response} object includes the http headers and the response body. Note that the entire response will be buffered in memory.
6868
* <br>
69-
* You can also have more control about the how the response is asynchronously processed by using an {@link AsyncHandler}
69+
* You can also have more control about how the response is asynchronously processed by using an {@link AsyncHandler}
7070
* <blockquote><pre>
7171
* AsyncHttpClient c = new AsyncHttpClient();
7272
* Future&lt;String&gt; f = c.prepareGet(TARGET_URL).execute(new AsyncHandler&lt;String&gt;() &#123;
@@ -149,7 +149,7 @@ public interface AsyncHttpClient extends Closeable {
149149
* Prepare an HTTP client request.
150150
*
151151
* @param method HTTP request method type. MUST BE in upper case
152-
* @param url A well formed URL.
152+
* @param url A well-formed URL.
153153
* @return {@link RequestBuilder}
154154
*/
155155
BoundRequestBuilder prepare(String method, String url);
@@ -158,71 +158,71 @@ public interface AsyncHttpClient extends Closeable {
158158
/**
159159
* Prepare an HTTP client GET request.
160160
*
161-
* @param url A well formed URL.
161+
* @param url A well-formed URL.
162162
* @return {@link RequestBuilder}
163163
*/
164164
BoundRequestBuilder prepareGet(String url);
165165

166166
/**
167167
* Prepare an HTTP client CONNECT request.
168168
*
169-
* @param url A well formed URL.
169+
* @param url A well-formed URL.
170170
* @return {@link RequestBuilder}
171171
*/
172172
BoundRequestBuilder prepareConnect(String url);
173173

174174
/**
175175
* Prepare an HTTP client OPTIONS request.
176176
*
177-
* @param url A well formed URL.
177+
* @param url A well-formed URL.
178178
* @return {@link RequestBuilder}
179179
*/
180180
BoundRequestBuilder prepareOptions(String url);
181181

182182
/**
183183
* Prepare an HTTP client HEAD request.
184184
*
185-
* @param url A well formed URL.
185+
* @param url A well-formed URL.
186186
* @return {@link RequestBuilder}
187187
*/
188188
BoundRequestBuilder prepareHead(String url);
189189

190190
/**
191191
* Prepare an HTTP client POST request.
192192
*
193-
* @param url A well formed URL.
193+
* @param url A well-formed URL.
194194
* @return {@link RequestBuilder}
195195
*/
196196
BoundRequestBuilder preparePost(String url);
197197

198198
/**
199199
* Prepare an HTTP client PUT request.
200200
*
201-
* @param url A well formed URL.
201+
* @param url A well-formed URL.
202202
* @return {@link RequestBuilder}
203203
*/
204204
BoundRequestBuilder preparePut(String url);
205205

206206
/**
207207
* Prepare an HTTP client DELETE request.
208208
*
209-
* @param url A well formed URL.
209+
* @param url A well-formed URL.
210210
* @return {@link RequestBuilder}
211211
*/
212212
BoundRequestBuilder prepareDelete(String url);
213213

214214
/**
215215
* Prepare an HTTP client PATCH request.
216216
*
217-
* @param url A well formed URL.
217+
* @param url A well-formed URL.
218218
* @return {@link RequestBuilder}
219219
*/
220220
BoundRequestBuilder preparePatch(String url);
221221

222222
/**
223223
* Prepare an HTTP client TRACE request.
224224
*
225-
* @param url A well formed URL.
225+
* @param url A well-formed URL.
226226
* @return {@link RequestBuilder}
227227
*/
228228
BoundRequestBuilder prepareTrace(String url);

client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public interface AsyncHttpClientConfig {
231231
boolean isDisableUrlEncodingForBoundRequests();
232232

233233
/**
234-
* @return true if AHC is to use a LAX cookie encoder, eg accept illegal chars in cookie value
234+
* @return true if AHC is to use a LAX cookie encoder, e.g. accept illegal chars in cookie value
235235
*/
236236
boolean isUseLaxCookieEncoder();
237237

client/src/main/java/org/asynchttpclient/ClientStats.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import java.util.Objects;
2121

2222
/**
23-
* A record class representing the state of an (@link org.asynchttpclient.AsyncHttpClient).
23+
* A record class representing the state of a (@link org.asynchttpclient.AsyncHttpClient).
2424
*/
2525
public class ClientStats {
2626

client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.asynchttpclient.cookie.CookieEvictionTask;
2626
import org.asynchttpclient.cookie.CookieStore;
2727
import org.asynchttpclient.filter.FilterContext;
28-
import org.asynchttpclient.filter.FilterException;
28+
import org.asynchttpclient.exception.FilterException;
2929
import org.asynchttpclient.filter.RequestFilter;
3030
import org.asynchttpclient.handler.resumable.ResumableAsyncHandler;
3131
import org.asynchttpclient.netty.channel.ChannelManager;

client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ public Builder setStrict302Handling(final boolean strict302Handling) {
978978

979979
/**
980980
* If true, AHC will add Accept-Encoding HTTP header to each request
981-
*
981+
* <p>
982982
* If false (default), AHC will either leave AcceptEncoding header as is
983983
* (if enableAutomaticDecompression is false) or will remove unsupported
984984
* algorithms (if enableAutomaticDecompression is true)
@@ -988,7 +988,6 @@ public Builder setCompressionEnforced(boolean compressionEnforced) {
988988
return this;
989989
}
990990

991-
992991
/*
993992
* If true (default), AHC will add a Netty HttpContentDecompressor, so compressed
994993
* content will automatically get decompressed.
@@ -997,7 +996,7 @@ public Builder setCompressionEnforced(boolean compressionEnforced) {
997996
* be done by calling code.
998997
*/
999998
public Builder setEnableAutomaticDecompression(boolean enable) {
1000-
this.enableAutomaticDecompression = enable;
999+
enableAutomaticDecompression = enable;
10011000
return this;
10021001
}
10031002

client/src/main/java/org/asynchttpclient/HttpResponseStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.net.SocketAddress;
2222

2323
/**
24-
* A class that represent the HTTP response' status line (code + text)
24+
* A class that represent the HTTP response status line (code + text)
2525
*/
2626
public abstract class HttpResponseStatus {
2727

client/src/main/java/org/asynchttpclient/ListenableFuture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public interface ListenableFuture<V> extends Future<V> {
7070
* in the thread where completion happens.
7171
* <br>
7272
* There is no guaranteed ordering of execution of listeners, they may get
73-
* called in the order they were added and they may get called out of order,
73+
* called in the order they were added, and they may get called out of order,
7474
* but any listener added through this method is guaranteed to be called once
7575
* the computation is complete.
7676
*

client/src/main/java/org/asynchttpclient/Request.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,32 +84,32 @@ public interface Request {
8484
List<Cookie> getCookies();
8585

8686
/**
87-
* @return the request's body byte array (only non null if it was set this way)
87+
* @return the request's body byte array (only non-null if it was set this way)
8888
*/
8989
byte @Nullable [] getByteData();
9090

9191
/**
92-
* @return the request's body array of byte arrays (only non null if it was set this way)
92+
* @return the request's body array of byte arrays (only non-null if it was set this way)
9393
*/
9494
@Nullable List<byte[]> getCompositeByteData();
9595

9696
/**
97-
* @return the request's body string (only non null if it was set this way)
97+
* @return the request's body string (only non-null if it was set this way)
9898
*/
9999
@Nullable String getStringData();
100100

101101
/**
102-
* @return the request's body ByteBuffer (only non null if it was set this way)
102+
* @return the request's body ByteBuffer (only non-null if it was set this way)
103103
*/
104104
@Nullable ByteBuffer getByteBufferData();
105105

106106
/**
107-
* @return the request's body InputStream (only non null if it was set this way)
107+
* @return the request's body InputStream (only non-null if it was set this way)
108108
*/
109109
@Nullable InputStream getStreamData();
110110

111111
/**
112-
* @return the request's body BodyGenerator (only non null if it was set this way)
112+
* @return the request's body BodyGenerator (only non-null if it was set this way)
113113
*/
114114
@Nullable BodyGenerator getBodyGenerator();
115115

@@ -159,7 +159,7 @@ public interface Request {
159159
Duration getRequestTimeout();
160160

161161
/**
162-
* @return the read timeout. Non zero values means "override config value".
162+
* @return the read timeout. Non-zero values means "override config value".
163163
*/
164164
Duration getReadTimeout();
165165

0 commit comments

Comments
 (0)