Skip to content

Commit c7af501

Browse files
committed
Javadoc improvements
- Fix @link tags. - Fix @SInCE tag. - Add missing @throws tags. - Add missing @param tags for generics. - Add missing @return tags. - Sentences end in a period. - Fix typos.
1 parent e8f2a67 commit c7af501

Some content is hidden

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

43 files changed

+60
-13
lines changed

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameInputBuffer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,8 @@ public void put(final ByteBuffer src) {
101101
*
102102
* @param src the source buffer or {@code null} if not available.
103103
* @param channel the underlying data channel.
104-
*
105104
* @return a complete frame or {@code null} a complete frame cannot be read.
106-
*
105+
* @throws IOException in case of an I/O error.
107106
* @since 5.1
108107
*/
109108
public RawFrame read(final ByteBuffer src, final ReadableByteChannel channel) throws IOException {
@@ -190,6 +189,8 @@ public RawFrame read(final ByteBuffer src, final ReadableByteChannel channel) th
190189
* Attempts to read a complete frame from the underlying data channel.
191190
*
192191
* @param channel the underlying data channel.
192+
* @return a complete frame or {@code null} a complete frame cannot be read.
193+
* @throws IOException in case of an I/O error.
193194
*/
194195
public RawFrame read(final ReadableByteChannel channel) throws IOException {
195196
return read(null, channel);

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequester.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ public void cancelled() {
264264
}
265265

266266
/**
267+
* @param <T> The result type returned by the Future's {@code get} method.
267268
* @since 5.3
268269
*/
269270
public final <T> Future<T> execute(
@@ -304,6 +305,7 @@ public final <T> Future<T> execute(
304305
}
305306

306307
/**
308+
* @param <T> The result type returned by the Future's {@code get} method.
307309
* @since 5.3
308310
*/
309311
public final <T> Future<T> execute(

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ public final H2RequesterBootstrap register(final String hostname, final String u
324324
}
325325

326326
/**
327+
* @return this instance.
327328
* @deprecated Use {@link #register(String, String, Supplier)}.
328329
*/
329330
@Deprecated

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ public final H2ServerBootstrap registerVirtual(final String hostname, final Stri
317317
* Registers the given {@link AsyncServerRequestHandler} as a default handler for URIs
318318
* matching the given pattern.
319319
*
320+
* @param <T> request handler representation.
320321
* @param uriPattern the pattern to register the handler for.
321322
* @param requestHandler the handler.
322323
* @return this instance.
@@ -332,6 +333,7 @@ public final <T> H2ServerBootstrap register(
332333
* Registers the given {@link AsyncServerRequestHandler} as a handler for URIs
333334
* matching the given host and the pattern.
334335
*
336+
* @param <T> request handler representation.
335337
* @param hostname the host name
336338
* @param uriPattern the pattern to register the handler for.
337339
* @param requestHandler the handler.
@@ -348,6 +350,7 @@ public final <T> H2ServerBootstrap register(
348350
}
349351

350352
/**
353+
* @param <T> request handler representation.
351354
* @return this instance.
352355
* @deprecated Use {@link #register(String, String, Supplier)}.
353356
*/
@@ -361,6 +364,8 @@ public final <T> H2ServerBootstrap registerVirtual(
361364

362365
/**
363366
* Adds the filter before the filter with the given name.
367+
*
368+
* @return this instance.
364369
*/
365370
public final H2ServerBootstrap addFilterBefore(final String existing, final String name, final AsyncFilterHandler filterHandler) {
366371
Args.notBlank(existing, "Existing");

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AsyncPingHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public interface AsyncPingHandler {
4949
* Triggered to signal receipt of a ping response message.
5050
*
5151
* @param feedback the ping message feedback.
52+
* @throws HttpException in case of HTTP protocol violation.
53+
* @throws IOException in case of an I/O error.
5254
*/
5355
void consumeResponse(ByteBuffer feedback) throws HttpException, IOException;
5456

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2TlsSupport.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public static String[] selectApplicationProtocols(final Object attachment) {
6868
}
6969

7070
/**
71+
* @return the given SSLParameters.
7172
* @since 5.3
7273
*/
7374
public static SSLParameters enforceRequirements(

httpcore5-reactive/src/main/java/org/apache/hc/core5/reactive/ReactiveRequestProcessor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public interface ReactiveRequestProcessor {
5454
* @param context the actual execution context.
5555
* @param requestBody a reactive stream representing the request body.
5656
* @param responseBodyCallback a callback to invoke with the response body, if any.
57+
* @throws HttpException in case of HTTP protocol violation.
58+
* @throws IOException in case of an I/O error.
5759
*/
5860
void processRequest(
5961
HttpRequest request,

httpcore5-reactive/src/test/java/org/apache/hc/core5/reactive/BasicDataStreamChannel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
import java.util.ArrayList;
3737
import java.util.List;
3838

39+
/**
40+
* Writes to a byte stream channel.
41+
*/
3942
public class BasicDataStreamChannel implements DataStreamChannel {
4043

4144
private final WritableByteChannel byteChannel;

httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/MessageExchangeHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.apache.hc.core5.http.protocol.HttpContext;
3939

4040
/**
41+
* @param <T> The message body type.
4142
* @since 5.0
4243
*/
4344
public abstract class MessageExchangeHandler<T> extends AbstractServerExchangeHandler<Message<HttpRequest, T>> {

httpcore5/src/main/java/org/apache/hc/core5/concurrent/FutureCallback.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
package org.apache.hc.core5.concurrent;
2828

2929
/**
30-
* A callback interface that gets invoked upon completion of
31-
* a {@link concurrent.Future}.
30+
* A callback interface that gets invoked upon completion of a {@link java.util.concurrent.Future}.
3231
*
3332
* @param <T> the future result type returned by this callback.
3433
* @since 4.2

0 commit comments

Comments
 (0)