From e8f2a67bc3385235c56b89e51bbd8fe1441c04c2 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sat, 17 Aug 2024 14:27:27 -0400 Subject: [PATCH] Javadoc improvements - No need to use a FQCN when the name is already importted - Import type instead of using a FQCN - Use camel-case in paramerter name - Add missing Javadoc - Add some missing return tags - Close some HTML tags - Fix some comments --- .../H2MultiplexingRequesterBootstrap.java | 37 +++++++-- .../nio/bootstrap/H2RequesterBootstrap.java | 56 ++++++++++--- .../impl/nio/bootstrap/H2ServerBootstrap.java | 57 +++++++++++-- .../hc/core5/concurrent/FutureCallback.java | 2 +- .../org/apache/hc/core5/http/HttpEntity.java | 2 +- .../hc/core5/http/config/Http1Config.java | 1 + .../bootstrap/AsyncRequesterBootstrap.java | 44 +++++++--- .../impl/bootstrap/AsyncServerBootstrap.java | 18 ++-- .../impl/bootstrap/RequesterBootstrap.java | 8 +- .../http/impl/bootstrap/ServerBootstrap.java | 22 ++--- .../http/impl/io/AbstractMessageParser.java | 2 +- .../http/impl/routing/RequestRouter.java | 4 +- .../http/io/ResponseOutOfOrderStrategy.java | 6 +- .../apache/hc/core5/http/io/SocketConfig.java | 45 ++++++---- .../http/io/entity/AbstractHttpEntity.java | 4 +- .../AbstractHeaderElementIterator.java | 2 +- .../message/BasicHeaderElementIterator.java | 2 +- .../http/message/BasicHeaderIterator.java | 2 +- .../http/message/BasicListHeaderIterator.java | 2 +- .../http/message/BasicTokenIterator.java | 2 +- .../org/apache/hc/core5/net/URIAuthority.java | 3 +- .../org/apache/hc/core5/net/URIBuilder.java | 64 +++++++------- .../hc/core5/reactor/IOReactorConfig.java | 83 ++++++++++++------- .../hc/core5/ssl/SSLContextBuilder.java | 22 +++-- .../org/apache/hc/core5/util/VersionInfo.java | 2 +- .../impl/io/TimeoutByteArrayInputStream.java | 2 +- .../http/message/TestBasicHeaderIterator.java | 2 +- 27 files changed, 332 insertions(+), 164 deletions(-) diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequesterBootstrap.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequesterBootstrap.java index 70c480074e..207bea1984 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequesterBootstrap.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequesterBootstrap.java @@ -81,6 +81,8 @@ public static H2MultiplexingRequesterBootstrap bootstrap() { /** * Sets I/O reactor configuration. + * + * @return this instance. */ public final H2MultiplexingRequesterBootstrap setIOReactorConfig(final IOReactorConfig ioReactorConfig) { this.ioReactorConfig = ioReactorConfig; @@ -88,7 +90,9 @@ public final H2MultiplexingRequesterBootstrap setIOReactorConfig(final IOReactor } /** - * Assigns {@link HttpProcessor} instance. + * Sets {@link HttpProcessor} instance. + * + * @return this instance. */ public final H2MultiplexingRequesterBootstrap setHttpProcessor(final HttpProcessor httpProcessor) { this.httpProcessor = httpProcessor; @@ -97,6 +101,8 @@ public final H2MultiplexingRequesterBootstrap setHttpProcessor(final HttpProcess /** * Sets HTTP/2 protocol parameters + * + * @return this instance. */ public final H2MultiplexingRequesterBootstrap setH2Config(final H2Config h2Config) { this.h2Config = h2Config; @@ -105,6 +111,8 @@ public final H2MultiplexingRequesterBootstrap setH2Config(final H2Config h2Confi /** * Sets message char coding. + * + * @return this instance. */ public final H2MultiplexingRequesterBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) { this.charCodingConfig = charCodingConfig; @@ -112,7 +120,9 @@ public final H2MultiplexingRequesterBootstrap setCharCodingConfig(final CharCodi } /** - * Assigns {@link TlsStrategy} instance. + * Sets {@link TlsStrategy} instance. + * + * @return this instance. */ public final H2MultiplexingRequesterBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) { this.tlsStrategy = tlsStrategy; @@ -125,7 +135,9 @@ public final H2MultiplexingRequesterBootstrap setStrictALPNHandshake(final boole } /** - * Assigns {@link IOSession} {@link Decorator} instance. + * Sets {@link IOSession} {@link Decorator} instance. + * + * @return this instance. */ public final H2MultiplexingRequesterBootstrap setIOSessionDecorator(final Decorator ioSessionDecorator) { this.ioSessionDecorator = ioSessionDecorator; @@ -133,7 +145,9 @@ public final H2MultiplexingRequesterBootstrap setIOSessionDecorator(final Decora } /** - * Assigns {@link Exception} {@link Callback} instance. + * Sets {@link Exception} {@link Callback} instance. + * + * @return this instance. */ public final H2MultiplexingRequesterBootstrap setExceptionCallback(final Callback exceptionCallback) { this.exceptionCallback = exceptionCallback; @@ -141,7 +155,9 @@ public final H2MultiplexingRequesterBootstrap setExceptionCallback(final Callbac } /** - * Assigns {@link IOSessionListener} instance. + * Sets {@link IOSessionListener} instance. + * + * @return this instance. */ public final H2MultiplexingRequesterBootstrap setIOSessionListener(final IOSessionListener sessionListener) { this.sessionListener = sessionListener; @@ -149,7 +165,9 @@ public final H2MultiplexingRequesterBootstrap setIOSessionListener(final IOSessi } /** - * Assigns {@link H2StreamListener} instance. + * Sets {@link H2StreamListener} instance. + * + * @return this instance. */ public final H2MultiplexingRequesterBootstrap setStreamListener(final H2StreamListener streamListener) { this.streamListener = streamListener; @@ -157,7 +175,9 @@ public final H2MultiplexingRequesterBootstrap setStreamListener(final H2StreamLi } /** - * Assigns {@link UriPatternType} for handler registration. + * Sets {@link UriPatternType} for handler registration. + * + * @return this instance. */ public final H2MultiplexingRequesterBootstrap setUriPatternType(final UriPatternType uriPatternType) { this.uriPatternType = uriPatternType; @@ -170,6 +190,7 @@ public final H2MultiplexingRequesterBootstrap setUriPatternType(final UriPattern * * @param uriPattern the pattern to register the handler for. * @param supplier the handler supplier. + * @return this instance. */ public final H2MultiplexingRequesterBootstrap register(final String uriPattern, final Supplier supplier) { Args.notBlank(uriPattern, "URI pattern"); @@ -185,6 +206,7 @@ public final H2MultiplexingRequesterBootstrap register(final String uriPattern, * @param hostname the host name * @param uriPattern the pattern to register the handler for. * @param supplier the handler supplier. + * @return this instance. * * @since 5.3 */ @@ -197,6 +219,7 @@ public final H2MultiplexingRequesterBootstrap register(final String hostname, fi } /** + * @return this instance. * @deprecated Use {@link #register(String, String, Supplier)}. */ @Deprecated diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java index 2ef5cb02fb..dc5ac20819 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java @@ -110,6 +110,8 @@ public static H2RequesterBootstrap bootstrap() { /** * Sets I/O reactor configuration. + * + * @return this instance. */ public final H2RequesterBootstrap setIOReactorConfig(final IOReactorConfig ioReactorConfig) { this.ioReactorConfig = ioReactorConfig; @@ -117,7 +119,9 @@ public final H2RequesterBootstrap setIOReactorConfig(final IOReactorConfig ioRea } /** - * Assigns {@link HttpProcessor} instance. + * Sets {@link HttpProcessor} instance. + * + * @return this instance. */ public final H2RequesterBootstrap setHttpProcessor(final HttpProcessor httpProcessor) { this.httpProcessor = httpProcessor; @@ -126,6 +130,8 @@ public final H2RequesterBootstrap setHttpProcessor(final HttpProcessor httpProce /** * Sets HTTP protocol version policy + * + * @return this instance. */ public final H2RequesterBootstrap setVersionPolicy(final HttpVersionPolicy versionPolicy) { this.versionPolicy = versionPolicy; @@ -134,6 +140,8 @@ public final H2RequesterBootstrap setVersionPolicy(final HttpVersionPolicy versi /** * Sets HTTP/2 protocol parameters + * + * @return this instance. */ public final H2RequesterBootstrap setH2Config(final H2Config h2Config) { this.h2Config = h2Config; @@ -142,6 +150,8 @@ public final H2RequesterBootstrap setH2Config(final H2Config h2Config) { /** * Sets HTTP/1.1 protocol parameters + * + * @return this instance. */ public final H2RequesterBootstrap setHttp1Config(final Http1Config http1Config) { this.http1Config = http1Config; @@ -150,6 +160,8 @@ public final H2RequesterBootstrap setHttp1Config(final Http1Config http1Config) /** * Sets message char coding. + * + * @return this instance. */ public final H2RequesterBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) { this.charCodingConfig = charCodingConfig; @@ -172,7 +184,9 @@ public final H2RequesterBootstrap setTimeToLive(final TimeValue timeToLive) { } /** - * Assigns {@link PoolReusePolicy} instance. + * Sets {@link PoolReusePolicy} instance. + * + * @return this instance. */ public final H2RequesterBootstrap setPoolReusePolicy(final PoolReusePolicy poolReusePolicy) { this.poolReusePolicy = poolReusePolicy; @@ -180,7 +194,9 @@ public final H2RequesterBootstrap setPoolReusePolicy(final PoolReusePolicy poolR } /** - * Assigns {@link PoolConcurrencyPolicy} instance. + * Sets {@link PoolConcurrencyPolicy} instance. + * + * @return this instance. */ @Experimental public final H2RequesterBootstrap setPoolConcurrencyPolicy(final PoolConcurrencyPolicy poolConcurrencyPolicy) { @@ -189,7 +205,9 @@ public final H2RequesterBootstrap setPoolConcurrencyPolicy(final PoolConcurrency } /** - * Assigns {@link TlsStrategy} instance. + * Sets {@link TlsStrategy} instance. + * + * @return this instance. */ public final H2RequesterBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) { this.tlsStrategy = tlsStrategy; @@ -202,7 +220,9 @@ public final H2RequesterBootstrap setHandshakeTimeout(final Timeout handshakeTim } /** - * Assigns {@link IOSession} {@link Decorator} instance. + * Sets {@link IOSession} {@link Decorator} instance. + * + * @return this instance. */ public final H2RequesterBootstrap setIOSessionDecorator(final Decorator ioSessionDecorator) { this.ioSessionDecorator = ioSessionDecorator; @@ -210,7 +230,9 @@ public final H2RequesterBootstrap setIOSessionDecorator(final Decorator exceptionCallback) { this.exceptionCallback = exceptionCallback; @@ -218,7 +240,9 @@ public final H2RequesterBootstrap setExceptionCallback(final Callback } /** - * Assigns {@link IOSessionListener} instance. + * Sets {@link IOSessionListener} instance. + * + * @return this instance. */ public final H2RequesterBootstrap setIOSessionListener(final IOSessionListener sessionListener) { this.sessionListener = sessionListener; @@ -226,7 +250,9 @@ public final H2RequesterBootstrap setIOSessionListener(final IOSessionListener s } /** - * Assigns {@link H2StreamListener} instance. + * Sets {@link H2StreamListener} instance. + * + * @return this instance. */ public final H2RequesterBootstrap setStreamListener(final H2StreamListener streamListener) { this.streamListener = streamListener; @@ -234,7 +260,9 @@ public final H2RequesterBootstrap setStreamListener(final H2StreamListener strea } /** - * Assigns {@link Http1StreamListener} instance. + * Sets {@link Http1StreamListener} instance. + * + * @return this instance. */ public final H2RequesterBootstrap setStreamListener(final Http1StreamListener http1StreamListener) { this.http1StreamListener = http1StreamListener; @@ -242,7 +270,9 @@ public final H2RequesterBootstrap setStreamListener(final Http1StreamListener ht } /** - * Assigns {@link ConnPoolListener} instance. + * Sets {@link ConnPoolListener} instance. + * + * @return this instance. */ public final H2RequesterBootstrap setConnPoolListener(final ConnPoolListener connPoolListener) { this.connPoolListener = connPoolListener; @@ -250,7 +280,9 @@ public final H2RequesterBootstrap setConnPoolListener(final ConnPoolListener supplier) { Args.notBlank(uriPattern, "URI pattern"); @@ -278,6 +311,7 @@ public final H2RequesterBootstrap register(final String uriPattern, final Suppli * @param hostname the host name * @param uriPattern the pattern to register the handler for. * @param supplier the handler supplier. + * @return this instance. * * @since 5.3 */ diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java index f8c6ffde9a..ce5d246551 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java @@ -115,6 +115,7 @@ public static H2ServerBootstrap bootstrap() { /** * Sets canonical name (fully qualified domain name) of the server. * + * @return this instance. * @since 5.0 */ public final H2ServerBootstrap setCanonicalHostName(final String canonicalHostName) { @@ -124,6 +125,8 @@ public final H2ServerBootstrap setCanonicalHostName(final String canonicalHostNa /** * Sets I/O reactor configuration. + * + * @return this instance. */ public final H2ServerBootstrap setIOReactorConfig(final IOReactorConfig ioReactorConfig) { this.ioReactorConfig = ioReactorConfig; @@ -131,7 +134,9 @@ public final H2ServerBootstrap setIOReactorConfig(final IOReactorConfig ioReacto } /** - * Assigns {@link HttpProcessor} instance. + * Sets {@link HttpProcessor} instance. + * + * @return this instance. */ public final H2ServerBootstrap setHttpProcessor(final HttpProcessor httpProcessor) { this.httpProcessor = httpProcessor; @@ -140,6 +145,8 @@ public final H2ServerBootstrap setHttpProcessor(final HttpProcessor httpProcesso /** * Sets HTTP protocol version policy + * + * @return this instance. */ public final H2ServerBootstrap setVersionPolicy(final HttpVersionPolicy versionPolicy) { this.versionPolicy = versionPolicy; @@ -148,6 +155,8 @@ public final H2ServerBootstrap setVersionPolicy(final HttpVersionPolicy versionP /** * Sets HTTP/2 protocol parameters + * + * @return this instance. */ public final H2ServerBootstrap setH2Config(final H2Config h2Config) { this.h2Config = h2Config; @@ -156,6 +165,8 @@ public final H2ServerBootstrap setH2Config(final H2Config h2Config) { /** * Sets HTTP/1.1 protocol parameters + * + * @return this instance. */ public final H2ServerBootstrap setHttp1Config(final Http1Config http1Config) { this.http1Config = http1Config; @@ -164,6 +175,8 @@ public final H2ServerBootstrap setHttp1Config(final Http1Config http1Config) { /** * Sets message char coding. + * + * @return this instance. */ public final H2ServerBootstrap setCharset(final CharCodingConfig charCodingConfig) { this.charCodingConfig = charCodingConfig; @@ -171,7 +184,9 @@ public final H2ServerBootstrap setCharset(final CharCodingConfig charCodingConfi } /** - * Assigns {@link TlsStrategy} instance. + * Sets {@link TlsStrategy} instance. + * + * @return this instance. */ public final H2ServerBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) { this.tlsStrategy = tlsStrategy; @@ -184,7 +199,9 @@ public final H2ServerBootstrap setHandshakeTimeout(final Timeout handshakeTimeou } /** - * Assigns {@link IOSession} {@link Decorator} instance. + * Sets {@link IOSession} {@link Decorator} instance. + * + * @return this instance. */ public final H2ServerBootstrap setIOSessionDecorator(final Decorator ioSessionDecorator) { this.ioSessionDecorator = ioSessionDecorator; @@ -192,7 +209,9 @@ public final H2ServerBootstrap setIOSessionDecorator(final Decorator } /** - * Assigns {@link Exception} {@link Callback} instance. + * Sets {@link Exception} {@link Callback} instance. + * + * @return this instance. */ public final H2ServerBootstrap setExceptionCallback(final Callback exceptionCallback) { this.exceptionCallback = exceptionCallback; @@ -200,7 +219,9 @@ public final H2ServerBootstrap setExceptionCallback(final Callback ex } /** - * Assigns {@link IOSessionListener} instance. + * Sets {@link IOSessionListener} instance. + * + * @return this instance. */ public final H2ServerBootstrap setIOSessionListener(final IOSessionListener sessionListener) { this.sessionListener = sessionListener; @@ -208,7 +229,9 @@ public final H2ServerBootstrap setIOSessionListener(final IOSessionListener sess } /** - * Assigns {@link H2StreamListener} instance. + * Sets {@link H2StreamListener} instance. + * + * @return this instance. */ public final H2ServerBootstrap setStreamListener(final H2StreamListener h2StreamListener) { this.h2StreamListener = h2StreamListener; @@ -216,7 +239,9 @@ public final H2ServerBootstrap setStreamListener(final H2StreamListener h2Stream } /** - * Assigns {@link Http1StreamListener} instance. + * Sets {@link Http1StreamListener} instance. + * + * @return this instance. */ public final H2ServerBootstrap setStreamListener(final Http1StreamListener http1StreamListener) { this.http1StreamListener = http1StreamListener; @@ -224,6 +249,7 @@ public final H2ServerBootstrap setStreamListener(final Http1StreamListener http1 } /** + * @return this instance. * @deprecated Use {@link RequestRouter}. */ @Deprecated @@ -233,8 +259,9 @@ public final H2ServerBootstrap setLookupRegistry(final org.apache.hc.core5.http. } /** - * Assigns {@link HttpRequestMapper} instance. + * Sets {@link HttpRequestMapper} instance. * + * @return this instance. * @see org.apache.hc.core5.http.impl.routing.RequestRouter * @since 5.3 */ @@ -249,6 +276,7 @@ public final H2ServerBootstrap setRequestRouter(final HttpRequestMapper supplier) { Args.notBlank(uriPattern, "URI pattern"); @@ -264,6 +292,7 @@ public final H2ServerBootstrap register(final String uriPattern, final Supplier< * @param hostname the host name * @param uriPattern the pattern to register the handler for. * @param supplier the handler supplier. + * @return this instance. * * @since 5.3 */ @@ -276,6 +305,7 @@ public final H2ServerBootstrap register(final String hostname, final String uriP } /** + * @return this instance. * @deprecated Use {@link #register(String, String, Supplier)}. */ @Deprecated @@ -289,6 +319,7 @@ public final H2ServerBootstrap registerVirtual(final String hostname, final Stri * * @param uriPattern the pattern to register the handler for. * @param requestHandler the handler. + * @return this instance. */ public final H2ServerBootstrap register( final String uriPattern, @@ -304,6 +335,7 @@ public final H2ServerBootstrap register( * @param hostname the host name * @param uriPattern the pattern to register the handler for. * @param requestHandler the handler. + * @return this instance. * * @since 5.3 */ @@ -316,6 +348,7 @@ public final H2ServerBootstrap register( } /** + * @return this instance. * @deprecated Use {@link #register(String, String, Supplier)}. */ @Deprecated @@ -339,6 +372,8 @@ public final H2ServerBootstrap addFilterBefore(final String existing, final Stri /** * Adds the filter after the filter with the given name. + * + * @return this instance. */ public final H2ServerBootstrap addFilterAfter(final String existing, final String name, final AsyncFilterHandler filterHandler) { Args.notBlank(existing, "Existing"); @@ -350,6 +385,8 @@ public final H2ServerBootstrap addFilterAfter(final String existing, final Strin /** * Replace an existing filter with the given name with new filter. + * + * @return this instance. */ public final H2ServerBootstrap replaceFilter(final String existing, final AsyncFilterHandler filterHandler) { Args.notBlank(existing, "Existing"); @@ -360,6 +397,8 @@ public final H2ServerBootstrap replaceFilter(final String existing, final AsyncF /** * Add an filter to the head of the processing list. + * + * @return this instance. */ public final H2ServerBootstrap addFilterFirst(final String name, final AsyncFilterHandler filterHandler) { Args.notNull(name, "Name"); @@ -370,6 +409,8 @@ public final H2ServerBootstrap addFilterFirst(final String name, final AsyncFilt /** * Add an filter to the tail of the processing list. + * + * @return this instance. */ public final H2ServerBootstrap addFilterLast(final String name, final AsyncFilterHandler filterHandler) { Args.notNull(name, "Name"); diff --git a/httpcore5/src/main/java/org/apache/hc/core5/concurrent/FutureCallback.java b/httpcore5/src/main/java/org/apache/hc/core5/concurrent/FutureCallback.java index b606be7cf2..646c1be09c 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/concurrent/FutureCallback.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/concurrent/FutureCallback.java @@ -28,7 +28,7 @@ /** * A callback interface that gets invoked upon completion of - * a {@link java.util.concurrent.Future}. + * a {@link concurrent.Future}. * * @param the future result type returned by this callback. * @since 4.2 diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/HttpEntity.java b/httpcore5/src/main/java/org/apache/hc/core5/http/HttpEntity.java index 74aa587bc9..36aa70536e 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/HttpEntity.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/HttpEntity.java @@ -102,7 +102,7 @@ public interface HttpEntity extends EntityDetails, Closeable { * * @throws IOException if the stream could not be created * @throws UnsupportedOperationException - * if entity content cannot be represented as {@link java.io.InputStream}. + * if entity content cannot be represented as {@link InputStream}. * * @see #isRepeatable() */ diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/config/Http1Config.java b/httpcore5/src/main/java/org/apache/hc/core5/http/config/Http1Config.java index f8817469b5..aa96867d98 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/config/Http1Config.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/config/Http1Config.java @@ -174,6 +174,7 @@ public static class Builder { * Presently only {@link HttpVersion#HTTP_1_0} and {@link HttpVersion#HTTP_1_1} are * supported. * + * @return this instance. * @since 5.3 */ public Builder setVersion(final HttpVersion version) { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncRequesterBootstrap.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncRequesterBootstrap.java index 879adea10c..4de8b5daca 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncRequesterBootstrap.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncRequesterBootstrap.java @@ -87,6 +87,8 @@ public static AsyncRequesterBootstrap bootstrap() { /** * Sets I/O reactor configuration. + * + * @return this instance. */ public final AsyncRequesterBootstrap setIOReactorConfig(final IOReactorConfig ioReactorConfig) { this.ioReactorConfig = ioReactorConfig; @@ -95,6 +97,8 @@ public final AsyncRequesterBootstrap setIOReactorConfig(final IOReactorConfig io /** * Sets HTTP/1.1 protocol parameters + * + * @return this instance. */ public final AsyncRequesterBootstrap setHttp1Config(final Http1Config http1Config) { this.http1Config = http1Config; @@ -103,6 +107,8 @@ public final AsyncRequesterBootstrap setHttp1Config(final Http1Config http1Confi /** * Sets message char coding. + * + * @return this instance. */ public final AsyncRequesterBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) { this.charCodingConfig = charCodingConfig; @@ -110,7 +116,9 @@ public final AsyncRequesterBootstrap setCharCodingConfig(final CharCodingConfig } /** - * Assigns {@link HttpProcessor} instance. + * Sets {@link HttpProcessor} instance. + * + * @return this instance. */ public final AsyncRequesterBootstrap setHttpProcessor(final HttpProcessor httpProcessor) { this.httpProcessor = httpProcessor; @@ -118,7 +126,9 @@ public final AsyncRequesterBootstrap setHttpProcessor(final HttpProcessor httpPr } /** - * Assigns {@link ConnectionReuseStrategy} instance. + * Sets {@link ConnectionReuseStrategy} instance. + * + * @return this instance. */ public final AsyncRequesterBootstrap setConnectionReuseStrategy(final ConnectionReuseStrategy connStrategy) { this.connStrategy = connStrategy; @@ -141,7 +151,9 @@ public final AsyncRequesterBootstrap setTimeToLive(final Timeout timeToLive) { } /** - * Assigns {@link PoolReusePolicy} instance. + * Sets {@link PoolReusePolicy} instance. + * + * @return this instance. */ public final AsyncRequesterBootstrap setPoolReusePolicy(final PoolReusePolicy poolReusePolicy) { this.poolReusePolicy = poolReusePolicy; @@ -149,7 +161,9 @@ public final AsyncRequesterBootstrap setPoolReusePolicy(final PoolReusePolicy po } /** - * Assigns {@link PoolConcurrencyPolicy} instance. + * Sets {@link PoolConcurrencyPolicy} instance. + * + * @return this instance. */ @Experimental public final AsyncRequesterBootstrap setPoolConcurrencyPolicy(final PoolConcurrencyPolicy poolConcurrencyPolicy) { @@ -158,7 +172,7 @@ public final AsyncRequesterBootstrap setPoolConcurrencyPolicy(final PoolConcurre } /** - * Assigns {@link TlsStrategy} instance. + * Sets {@link TlsStrategy} instance. */ public final AsyncRequesterBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) { this.tlsStrategy = tlsStrategy; @@ -171,7 +185,9 @@ public final AsyncRequesterBootstrap setTlsHandshakeTimeout(final Timeout handsh } /** - * Assigns {@link IOSession} {@link Decorator} instance. + * Sets {@link IOSession} {@link Decorator} instance. + * + * @return this instance. */ public final AsyncRequesterBootstrap setIOSessionDecorator(final Decorator ioSessionDecorator) { this.ioSessionDecorator = ioSessionDecorator; @@ -179,7 +195,9 @@ public final AsyncRequesterBootstrap setIOSessionDecorator(final Decorator exceptionCallback) { this.exceptionCallback = exceptionCallback; @@ -187,7 +205,9 @@ public final AsyncRequesterBootstrap setExceptionCallback(final Callback connPoolListener) { this.connPoolListener = connPoolListener; diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncServerBootstrap.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncServerBootstrap.java index 5de92830d0..b16db2b3bf 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncServerBootstrap.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncServerBootstrap.java @@ -136,7 +136,7 @@ public final AsyncServerBootstrap setCharCodingConfig(final CharCodingConfig cha } /** - * Assigns {@link org.apache.hc.core5.http.protocol.HttpProcessor} instance. + * Sets {@link org.apache.hc.core5.http.protocol.HttpProcessor} instance. */ public final AsyncServerBootstrap setHttpProcessor(final HttpProcessor httpProcessor) { this.httpProcessor = httpProcessor; @@ -144,7 +144,7 @@ public final AsyncServerBootstrap setHttpProcessor(final HttpProcessor httpProce } /** - * Assigns {@link org.apache.hc.core5.http.ConnectionReuseStrategy} instance. + * Sets {@link org.apache.hc.core5.http.ConnectionReuseStrategy} instance. */ public final AsyncServerBootstrap setConnectionReuseStrategy(final ConnectionReuseStrategy connStrategy) { this.connStrategy = connStrategy; @@ -152,7 +152,7 @@ public final AsyncServerBootstrap setConnectionReuseStrategy(final ConnectionReu } /** - * Assigns {@link TlsStrategy} instance. + * Sets {@link TlsStrategy} instance. */ public final AsyncServerBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) { this.tlsStrategy = tlsStrategy; @@ -160,7 +160,7 @@ public final AsyncServerBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) } /** - * Assigns TLS handshake {@link Timeout}. + * Sets TLS handshake {@link Timeout}. */ public final AsyncServerBootstrap setTlsHandshakeTimeout(final Timeout handshakeTimeout) { this.handshakeTimeout = handshakeTimeout; @@ -168,7 +168,7 @@ public final AsyncServerBootstrap setTlsHandshakeTimeout(final Timeout handshake } /** - * Assigns {@link IOSession} {@link Decorator} instance. + * Sets {@link IOSession} {@link Decorator} instance. */ public final AsyncServerBootstrap setIOSessionDecorator(final Decorator ioSessionDecorator) { this.ioSessionDecorator = ioSessionDecorator; @@ -176,7 +176,7 @@ public final AsyncServerBootstrap setIOSessionDecorator(final Decorator exceptionCallback) { this.exceptionCallback = exceptionCallback; @@ -184,7 +184,7 @@ public final AsyncServerBootstrap setExceptionCallback(final Callback } /** - * Assigns {@link IOSessionListener} instance. + * Sets {@link IOSessionListener} instance. */ public final AsyncServerBootstrap setIOSessionListener(final IOSessionListener sessionListener) { this.sessionListener = sessionListener; @@ -201,7 +201,7 @@ public final AsyncServerBootstrap setLookupRegistry(final org.apache.hc.core5.ht } /** - * Assigns {@link HttpRequestMapper} instance. + * Sets {@link HttpRequestMapper} instance. * * @see org.apache.hc.core5.http.impl.routing.RequestRouter * @since 5.3 @@ -212,7 +212,7 @@ public final AsyncServerBootstrap setRequestRouter(final HttpRequestMapper sslSetupHandler) { this.sslSetupHandler = sslSetupHandler; @@ -143,7 +143,7 @@ public final RequesterBootstrap setSslSetupHandler(final Callback } /** - * Assigns {@link SSLSessionVerifier} instance. + * Sets {@link SSLSessionVerifier} instance. */ public final RequesterBootstrap setSslSessionVerifier(final SSLSessionVerifier sslSessionVerifier) { this.sslSessionVerifier = sslSessionVerifier; diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java index eb31cb416e..da887dbf1c 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java @@ -127,7 +127,7 @@ public final ServerBootstrap setListenerPort(final int listenerPort) { } /** - * Assigns local interface for the listener. + * Sets local interface for the listener. */ public final ServerBootstrap setLocalAddress(final InetAddress localAddress) { this.localAddress = localAddress; @@ -159,7 +159,7 @@ public final ServerBootstrap setCharCodingConfig(final CharCodingConfig charCodi } /** - * Assigns {@link HttpProcessor} instance. + * Sets {@link HttpProcessor} instance. */ public final ServerBootstrap setHttpProcessor(final HttpProcessor httpProcessor) { this.httpProcessor = httpProcessor; @@ -167,7 +167,7 @@ public final ServerBootstrap setHttpProcessor(final HttpProcessor httpProcessor) } /** - * Assigns {@link ConnectionReuseStrategy} instance. + * Sets {@link ConnectionReuseStrategy} instance. */ public final ServerBootstrap setConnectionReuseStrategy(final ConnectionReuseStrategy connStrategy) { this.connStrategy = connStrategy; @@ -175,7 +175,7 @@ public final ServerBootstrap setConnectionReuseStrategy(final ConnectionReuseStr } /** - * Assigns {@link HttpResponseFactory} instance. + * Sets {@link HttpResponseFactory} instance. */ public final ServerBootstrap setResponseFactory(final HttpResponseFactory responseFactory) { this.responseFactory = responseFactory; @@ -232,7 +232,7 @@ public final ServerBootstrap registerVirtual(final String hostname, final String } /** - * Assigns {@link HttpRequestMapper} instance. + * Sets {@link HttpRequestMapper} instance. * * @see org.apache.hc.core5.http.impl.routing.RequestRouter * @since 5.3 @@ -243,7 +243,7 @@ public final ServerBootstrap setRequestRouter(final HttpRequestMapper connectionFactory) { @@ -252,7 +252,7 @@ public final ServerBootstrap setConnectionFactory( } /** - * Assigns {@link javax.net.ServerSocketFactory} instance. + * Sets {@link javax.net.ServerSocketFactory} instance. */ public final ServerBootstrap setServerSocketFactory(final ServerSocketFactory serverSocketFactory) { this.serverSocketFactory = serverSocketFactory; @@ -260,7 +260,7 @@ public final ServerBootstrap setServerSocketFactory(final ServerSocketFactory se } /** - * Assigns {@link javax.net.ssl.SSLContext} instance. + * Sets {@link javax.net.ssl.SSLContext} instance. *

* Please note this value can be overridden by the {@link #setServerSocketFactory( * javax.net.ServerSocketFactory)} method. @@ -271,7 +271,7 @@ public final ServerBootstrap setSslContext(final SSLContext sslContext) { } /** - * Assigns {@link Callback} for {@link SSLParameters}. + * Sets {@link Callback} for {@link SSLParameters}. */ public final ServerBootstrap setSslSetupHandler(final Callback sslSetupHandler) { this.sslSetupHandler = sslSetupHandler; @@ -279,7 +279,7 @@ public final ServerBootstrap setSslSetupHandler(final Callback ss } /** - * Assigns {@link ExceptionListener} instance. + * Sets {@link ExceptionListener} instance. */ public final ServerBootstrap setExceptionListener(final ExceptionListener exceptionListener) { this.exceptionListener = exceptionListener; @@ -287,7 +287,7 @@ public final ServerBootstrap setExceptionListener(final ExceptionListener except } /** - * Assigns {@link ExceptionListener} instance. + * Sets {@link ExceptionListener} instance. */ public final ServerBootstrap setStreamListener(final Http1StreamListener streamListener) { this.streamListener = streamListener; diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageParser.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageParser.java index cd3482bd54..db68c28e68 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageParser.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageParser.java @@ -135,7 +135,7 @@ public static Header[] parseHeaders( * @param parser line parser to use. * @param headerLines List of header lines. This list will be used to store * intermediate results. This makes it possible to resume parsing of - * headers in case of a {@link java.io.InterruptedIOException}. + * headers in case of a {@link InterruptedIOException}. * * @return array of HTTP headers * diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/routing/RequestRouter.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/routing/RequestRouter.java index dc997c2241..11516b8767 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/routing/RequestRouter.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/routing/RequestRouter.java @@ -229,7 +229,7 @@ public Builder addRoute(final String hostname, final String pathPattern, fina } /** - * Assigns custom {@link URIAuthority} resolution {@link Function} that can be used to normalize or re-write + * Sets custom {@link URIAuthority} resolution {@link Function} that can be used to normalize or re-write * the authority specified in incoming requests prior to request routing. The function can return * a new {@link URIAuthority} instance representing an identity of the service authoritative to handle * the request or {@code null} if an authoritative service cannot be found or is unknown. @@ -240,7 +240,7 @@ public Builder resolveAuthority(final BiFunction * - * @return the default socket timeout value for blocking I/O operations. + * @return this instance. * @see java.net.SocketOptions#SO_TIMEOUT */ public Builder setSoTimeout(final Timeout soTimeout) { @@ -272,13 +275,13 @@ public Builder setSoTimeout(final Timeout soTimeout) { } /** - * Determines the default value of the {@link java.net.SocketOptions#SO_REUSEADDR} parameter + * Determines the default value of the {@link SocketOptions#SO_REUSEADDR} parameter * for newly created sockets. *

* Default: {@code false} *

* - * @return the default value of the {@link java.net.SocketOptions#SO_REUSEADDR} parameter. + * @return this instance. * @see java.net.SocketOptions#SO_REUSEADDR */ public Builder setSoReuseAddress(final boolean soReuseAddress) { @@ -288,6 +291,8 @@ public Builder setSoReuseAddress(final boolean soReuseAddress) { /** * @see #setSoLinger(TimeValue) + * + * @return this instance. */ public Builder setSoLinger(final int soLinger, final TimeUnit timeUnit) { this.soLinger = Timeout.of(soLinger, timeUnit); @@ -295,13 +300,13 @@ public Builder setSoLinger(final int soLinger, final TimeUnit timeUnit) { } /** - * Determines the default value of the {@link java.net.SocketOptions#SO_LINGER} parameter + * Determines the default value of the {@link SocketOptions#SO_LINGER} parameter * for newly created sockets. *

* Default: {@code -1} *

* - * @return the default value of the {@link java.net.SocketOptions#SO_LINGER} parameter. + * @return this instance. * @see java.net.SocketOptions#SO_LINGER */ public Builder setSoLinger(final TimeValue soLinger) { @@ -310,13 +315,13 @@ public Builder setSoLinger(final TimeValue soLinger) { } /** - * Determines the default value of the {@link java.net.SocketOptions#SO_KEEPALIVE} parameter + * Determines the default value of the {@link SocketOptions#SO_KEEPALIVE} parameter * for newly created sockets. *

* Default: {@code false} *

* - * @return the default value of the {@link java.net.SocketOptions#SO_KEEPALIVE} parameter. + * @return this instance. * @see java.net.SocketOptions#SO_KEEPALIVE */ public Builder setSoKeepAlive(final boolean soKeepAlive) { @@ -325,13 +330,13 @@ public Builder setSoKeepAlive(final boolean soKeepAlive) { } /** - * Determines the default value of the {@link java.net.SocketOptions#TCP_NODELAY} parameter + * Determines the default value of the {@link SocketOptions#TCP_NODELAY} parameter * for newly created sockets. *

* Default: {@code false} *

* - * @return the default value of the {@link java.net.SocketOptions#TCP_NODELAY} parameter. + * @return this instance. * @see java.net.SocketOptions#TCP_NODELAY */ public Builder setTcpNoDelay(final boolean tcpNoDelay) { @@ -340,13 +345,13 @@ public Builder setTcpNoDelay(final boolean tcpNoDelay) { } /** - * Determines the default value of the {@link java.net.SocketOptions#SO_SNDBUF} parameter + * Determines the default value of the {@link SocketOptions#SO_SNDBUF} parameter * for newly created sockets. *

* Default: {@code 0} (system default) *

* - * @return the default value of the {@link java.net.SocketOptions#SO_SNDBUF} parameter. + * @return this instance. * @see java.net.SocketOptions#SO_SNDBUF * @since 4.4 */ @@ -356,13 +361,13 @@ public Builder setSndBufSize(final int sndBufSize) { } /** - * Determines the default value of the {@link java.net.SocketOptions#SO_RCVBUF} parameter + * Determines the default value of the {@link SocketOptions#SO_RCVBUF} parameter * for newly created sockets. *

* Default: {@code 0} (system default) *

* - * @return the default value of the {@link java.net.SocketOptions#SO_RCVBUF} parameter. + * @return this instance. * @see java.net.SocketOptions#SO_RCVBUF * @since 4.4 */ @@ -377,7 +382,8 @@ public Builder setRcvBufSize(final int rcvBufSize) { *

* Default: {@code 0} (system default) *

- * @return the maximum queue length for incoming connection indications + * + * @return this instance. * @since 4.4 */ public Builder setBacklogSize(final int backlogSize) { @@ -391,7 +397,8 @@ public Builder setBacklogSize(final int backlogSize) { *

* Default: {@code -1} (system default) *

- * @return the time (in seconds) the connection needs to remain idle before TCP starts + * + * @return this instance. * @since 5.3 */ public Builder setTcpKeepIdle(final int tcpKeepIdle) { @@ -404,7 +411,8 @@ public Builder setTcpKeepIdle(final int tcpKeepIdle) { *

* Default: {@code -1} (system default) *

- * @return the time (in seconds) between individual keepalive probes. + * + * @return this instance. * @since 5.3 */ public Builder setTcpKeepInterval(final int tcpKeepInterval) { @@ -417,7 +425,8 @@ public Builder setTcpKeepInterval(final int tcpKeepInterval) { *

* Default: {@code -1} (system default) *

- * @return the maximum number of keepalive probes TCP should send before dropping the connection. + * + * @return this instance. * @since 5.3 */ public Builder setTcpKeepCount(final int tcpKeepCount) { @@ -427,6 +436,8 @@ public Builder setTcpKeepCount(final int tcpKeepCount) { /** * The address of the SOCKS proxy to use. + * + * @return this instance. */ public Builder setSocksProxyAddress(final SocketAddress socksProxyAddress) { this.socksProxyAddress = socksProxyAddress; diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/AbstractHttpEntity.java b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/AbstractHttpEntity.java index f42db98a92..eb6d5ac7f3 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/AbstractHttpEntity.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/AbstractHttpEntity.java @@ -122,7 +122,7 @@ protected AbstractHttpEntity(final ContentType contentType, final String content * @param entity The entity to write, never null. * @param outStream Where to write the entity, never null. * @throws IOException if the entity cannot generate its content stream; also thrown if the output stream is closed. - * @throws UnsupportedOperationException if entity content cannot be represented as {@link java.io.InputStream}. + * @throws UnsupportedOperationException if entity content cannot be represented as {@link InputStream}. */ public static void writeTo(final HttpEntity entity, final OutputStream outStream) throws IOException { Args.notNull(entity, "Entity"); @@ -143,7 +143,7 @@ public static void writeTo(final HttpEntity entity, final OutputStream outStream * * @param outStream Where to write the entity, never null. * @throws IOException if the entity cannot generate its content stream; also thrown if the output stream is closed. - * @throws UnsupportedOperationException if entity content cannot be represented as {@link java.io.InputStream}. + * @throws UnsupportedOperationException if entity content cannot be represented as {@link InputStream}. */ @Override public void writeTo(final OutputStream outStream) throws IOException { diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHeaderElementIterator.java b/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHeaderElementIterator.java index 2b9a157269..c497bc5932 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHeaderElementIterator.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractHeaderElementIterator.java @@ -35,7 +35,7 @@ import org.apache.hc.core5.util.Args; /** - * {@link java.util.Iterator} of {@link org.apache.hc.core5.http.HeaderElement}s. + * {@link Iterator} of {@link org.apache.hc.core5.http.HeaderElement}s. * * @since 5.0 */ diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElementIterator.java b/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElementIterator.java index 9817930283..3bbdf55ee0 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElementIterator.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderElementIterator.java @@ -34,7 +34,7 @@ import org.apache.hc.core5.util.Args; /** - * {@link java.util.Iterator} of {@link org.apache.hc.core5.http.HeaderElement}s. + * {@link Iterator} of {@link org.apache.hc.core5.http.HeaderElement}s. * * @since 4.0 */ diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderIterator.java b/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderIterator.java index 3e11669ff0..fdaba87209 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderIterator.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicHeaderIterator.java @@ -34,7 +34,7 @@ import org.apache.hc.core5.util.Args; /** - * {@link java.util.Iterator} of {@link org.apache.hc.core5.http.Header}s. + * {@link Iterator} of {@link org.apache.hc.core5.http.Header}s. * * @since 4.0 */ diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicListHeaderIterator.java b/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicListHeaderIterator.java index 2fdc3313a6..8f11f7cb82 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicListHeaderIterator.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicListHeaderIterator.java @@ -36,7 +36,7 @@ import org.apache.hc.core5.util.Asserts; /** - * {@link java.util.Iterator} of {@link org.apache.hc.core5.http.Header}s. For use by {@link HeaderGroup}. + * {@link Iterator} of {@link org.apache.hc.core5.http.Header}s. For use by {@link HeaderGroup}. * * @since 4.0 */ diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicTokenIterator.java b/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicTokenIterator.java index 3ce8c0bcb1..d42e823184 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicTokenIterator.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/message/BasicTokenIterator.java @@ -34,7 +34,7 @@ import org.apache.hc.core5.util.Tokenizer; /** - * {@link java.util.Iterator} of {@link org.apache.hc.core5.http.Header} tokens.. + * {@link Iterator} of {@link org.apache.hc.core5.http.Header} tokens.. * * @since 4.0 */ diff --git a/httpcore5/src/main/java/org/apache/hc/core5/net/URIAuthority.java b/httpcore5/src/main/java/org/apache/hc/core5/net/URIAuthority.java index 3dd0ef0e72..498354d182 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/net/URIAuthority.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/net/URIAuthority.java @@ -28,6 +28,7 @@ package org.apache.hc.core5.net; import java.io.Serializable; +import java.net.URI; import java.net.URISyntaxException; import java.util.Objects; @@ -39,7 +40,7 @@ import org.apache.hc.core5.util.Tokenizer; /** - * Represents authority component of request {@link java.net.URI}. + * Represents authority component of request {@link URI}. * * @since 5.0 */ diff --git a/httpcore5/src/main/java/org/apache/hc/core5/net/URIBuilder.java b/httpcore5/src/main/java/org/apache/hc/core5/net/URIBuilder.java index 59c4f3b643..048f60fd29 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/net/URIBuilder.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/net/URIBuilder.java @@ -138,7 +138,7 @@ public URIBuilder(final URI uri, final Charset charset) { * Sets the authority. * * @param authority the authority. - * @return this. + * @return this instance. * @since 5.2 */ public URIBuilder setAuthority(final NamedEndpoint authority) { @@ -152,7 +152,7 @@ public URIBuilder setAuthority(final NamedEndpoint authority) { * Sets the authority. * * @param authority the authority. - * @return this. + * @return this instance. * @since 5.2 */ public URIBuilder setAuthority(final URIAuthority authority) { @@ -166,7 +166,7 @@ public URIBuilder setAuthority(final URIAuthority authority) { * Sets the Charset. * * @param charset the Charset. - * @return this. + * @return this instance. */ public URIBuilder setCharset(final Charset charset) { this.charset = charset; @@ -411,7 +411,7 @@ private void digestURI(final URI uri, final Charset charset) { /** * Sets URI scheme. * - * @return this. + * @return this instance. */ public URIBuilder setScheme(final String scheme) { this.scheme = !TextUtils.isBlank(scheme) ? scheme : null; @@ -422,7 +422,7 @@ public URIBuilder setScheme(final String scheme) { * Sets the URI scheme specific part. * * @param schemeSpecificPart - * @return this. + * @return this instance. * @since 5.1 */ public URIBuilder setSchemeSpecificPart(final String schemeSpecificPart) { @@ -435,7 +435,7 @@ public URIBuilder setSchemeSpecificPart(final String schemeSpecificPart) { * * @param schemeSpecificPart * @param nvps Optional, can be null. Variable arguments list of NameValuePair query parameters to be reused by the specific scheme part - * @return this. + * @return this instance. * @since 5.1 */ public URIBuilder setSchemeSpecificPart(final String schemeSpecificPart, final NameValuePair... nvps) { @@ -447,7 +447,7 @@ public URIBuilder setSchemeSpecificPart(final String schemeSpecificPart, final N * * @param schemeSpecificPart * @param nvps Optional, can be null. List of query parameters to be reused by the specific scheme part - * @return this. + * @return this instance. * @since 5.1 */ public URIBuilder setSchemeSpecificPart(final String schemeSpecificPart, final List nvps) { @@ -467,7 +467,7 @@ public URIBuilder setSchemeSpecificPart(final String schemeSpecificPart, final L * Sets URI user info. The value is expected to be unescaped and may contain non ASCII * characters. * - * @return this. + * @return this instance. */ public URIBuilder setUserInfo(final String userInfo) { this.userInfo = !TextUtils.isBlank(userInfo) ? userInfo : null; @@ -481,7 +481,7 @@ public URIBuilder setUserInfo(final String userInfo) { * Sets URI user info as a combination of username and password. These values are expected to * be unescaped and may contain non ASCII characters. * - * @return this. + * @return this instance. * * @deprecated The use of clear-text passwords in {@link URI}s has been deprecated and is strongly * discouraged. @@ -494,7 +494,7 @@ public URIBuilder setUserInfo(final String username, final String password) { /** * Sets URI host. * - * @return this. + * @return this instance. */ public URIBuilder setHost(final InetAddress host) { this.host = host != null ? host.getHostAddress() : null; @@ -508,7 +508,7 @@ public URIBuilder setHost(final InetAddress host) { * {@code [::1]} is not. It is dangerous to call {@code uriBuilder.setHost(uri.getHost())} due * to {@link URI#getHost()} returning URI encoded values. * - * @return this. + * @return this instance. */ public URIBuilder setHost(final String host) { this.host = host; @@ -521,7 +521,7 @@ public URIBuilder setHost(final String host) { * Sets the scheme, host name, and port. * * @param httpHost the scheme, host name, and port. - * @return this. + * @return this instance. */ public URIBuilder setHttpHost(final HttpHost httpHost) { setScheme(httpHost.getSchemeName()); @@ -533,7 +533,7 @@ public URIBuilder setHttpHost(final HttpHost httpHost) { /** * Sets URI port. * - * @return this. + * @return this instance. */ public URIBuilder setPort(final int port) { this.port = port < 0 ? -1 : port; @@ -545,7 +545,7 @@ public URIBuilder setPort(final int port) { /** * Sets URI path. The value is expected to be unescaped and may contain non ASCII characters. * - * @return this. + * @return this instance. */ public URIBuilder setPath(final String path) { setPathSegments(path != null ? splitPath(path) : null); @@ -556,7 +556,7 @@ public URIBuilder setPath(final String path) { /** * Appends path to URI. The value is expected to be unescaped and may contain non ASCII characters. * - * @return this. + * @return this instance. */ public URIBuilder appendPath(final String path) { if (path != null) { @@ -568,7 +568,7 @@ public URIBuilder appendPath(final String path) { /** * Sets URI path. The value is expected to be unescaped and may contain non ASCII characters. * - * @return this. + * @return this instance. */ public URIBuilder setPathSegments(final String... pathSegments) { return setPathSegments(Arrays.asList(pathSegments)); @@ -577,7 +577,7 @@ public URIBuilder setPathSegments(final String... pathSegments) { /** * Appends segments URI path. The value is expected to be unescaped and may contain non ASCII characters. * - * @return this. + * @return this instance. */ public URIBuilder appendPathSegments(final String... pathSegments) { return appendPathSegments(Arrays.asList(pathSegments)); @@ -587,7 +587,7 @@ public URIBuilder appendPathSegments(final String... pathSegments) { * Sets rootless URI path (the first segment does not start with a /). * The value is expected to be unescaped and may contain non ASCII characters. * - * @return this. + * @return this instance. * * @since 5.1 */ @@ -598,7 +598,7 @@ public URIBuilder setPathSegmentsRootless(final String... pathSegments) { /** * Sets URI path. The value is expected to be unescaped and may contain non ASCII characters. * - * @return this. + * @return this instance. */ public URIBuilder setPathSegments(final List pathSegments) { this.pathSegments = pathSegments != null && !pathSegments.isEmpty() ? new ArrayList<>(pathSegments) : null; @@ -611,7 +611,7 @@ public URIBuilder setPathSegments(final List pathSegments) { /** * Appends segments to URI path. The value is expected to be unescaped and may contain non ASCII characters. * - * @return this. + * @return this instance. */ public URIBuilder appendPathSegments(final List pathSegments) { if (pathSegments != null && !pathSegments.isEmpty()) { @@ -629,7 +629,7 @@ public URIBuilder appendPathSegments(final List pathSegments) { * Sets rootless URI path (the first segment does not start with a /). * The value is expected to be unescaped and may contain non ASCII characters. * - * @return this. + * @return this instance. * * @since 5.1 */ @@ -644,7 +644,7 @@ public URIBuilder setPathSegmentsRootless(final List pathSegments) { /** * Removes URI query. * - * @return this. + * @return this instance. */ public URIBuilder removeQuery() { this.queryParams = null; @@ -662,7 +662,7 @@ public URIBuilder removeQuery() { * will remove custom query if present. *

* - * @return this. + * @return this instance. */ public URIBuilder setParameters(final List nameValuePairs) { if (this.queryParams == null) { @@ -687,7 +687,7 @@ public URIBuilder setParameters(final List nameValuePairs) { * will remove custom query if present. *

* - * @return this. + * @return this instance. */ public URIBuilder addParameters(final List nameValuePairs) { if (this.queryParams == null) { @@ -710,7 +710,7 @@ public URIBuilder addParameters(final List nameValuePairs) { * will remove custom query if present. *

* - * @return this. + * @return this instance. */ public URIBuilder setParameters(final NameValuePair... nameValuePairs) { if (this.queryParams == null) { @@ -735,7 +735,7 @@ public URIBuilder setParameters(final NameValuePair... nameValuePairs) { * will remove custom query if present. *

* - * @return this. + * @return this instance. */ public URIBuilder addParameter(final String param, final String value) { return addParameter(new BasicNameValuePair(param, value)); @@ -749,7 +749,7 @@ public URIBuilder addParameter(final String param, final String value) { * will remove custom query if present. *

* - * @return this. + * @return this instance. * @since 5.2 */ public URIBuilder addParameter(final NameValuePair nameValuePair) { @@ -773,7 +773,7 @@ public URIBuilder addParameter(final NameValuePair nameValuePair) { * will remove custom query if present, even when no parameter was actually removed. *

* - * @return this. + * @return this instance. * @since 5.2 */ public URIBuilder removeParameter(final String param) { @@ -795,7 +795,7 @@ public URIBuilder removeParameter(final String param) { * will remove custom query if present. *

* - * @return this. + * @return this instance. */ public URIBuilder setParameter(final String param, final String value) { if (this.queryParams == null) { @@ -814,7 +814,7 @@ public URIBuilder setParameter(final String param, final String value) { /** * Clears URI query parameters. * - * @return this. + * @return this instance. */ public URIBuilder clearParameters() { this.queryParams = null; @@ -831,7 +831,7 @@ public URIBuilder clearParameters() { * will remove query parameters if present. *

* - * @return this. + * @return this instance. */ public URIBuilder setCustomQuery(final String query) { this.query = !TextUtils.isBlank(query) ? query : null; @@ -845,7 +845,7 @@ public URIBuilder setCustomQuery(final String query) { * Sets URI fragment. The value is expected to be unescaped and may contain non ASCII * characters. * - * @return this. + * @return this instance. */ public URIBuilder setFragment(final String fragment) { this.fragment = !TextUtils.isBlank(fragment) ? fragment : null; diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOReactorConfig.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOReactorConfig.java index 6232ebcdf9..d480cf72a5 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOReactorConfig.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOReactorConfig.java @@ -28,6 +28,7 @@ package org.apache.hc.core5.reactor; import java.net.SocketAddress; +import java.net.SocketOptions; import java.util.concurrent.TimeUnit; import org.apache.hc.core5.annotation.Contract; @@ -332,11 +333,13 @@ public static void setDefaultMaxIOThreadCount(final int defaultMaxIOThreadCount) } /** - * Determines time interval at which the I/O reactor wakes up to check for timed out sessions + * Sets time interval at which the I/O reactor wakes up to check for timed out sessions * and session requests. *

* Default: {@code 1000} milliseconds. *

+ * + * @return this instance. */ public Builder setSelectInterval(final TimeValue selectInterval) { this.selectInterval = selectInterval; @@ -344,10 +347,12 @@ public Builder setSelectInterval(final TimeValue selectInterval) { } /** - * Determines the number of I/O dispatch threads to be used by the I/O reactor. + * Sets the number of I/O dispatch threads to be used by the I/O reactor. *

* Default: {@code 2} *

+ * + * @return this instance. */ public Builder setIoThreadCount(final int ioThreadCount) { this.ioThreadCount = ioThreadCount; @@ -355,12 +360,13 @@ public Builder setIoThreadCount(final int ioThreadCount) { } /** - * Determines the default socket timeout value for non-blocking I/O operations. + * Sets the default socket timeout value for non-blocking I/O operations. *

* Default: {@code 0} (no timeout) *

* - * @see java.net.SocketOptions#SO_TIMEOUT + * @return this instance. + * @see SocketOptions#SO_TIMEOUT */ public Builder setSoTimeout(final int soTimeout, final TimeUnit timeUnit) { this.soTimeout = Timeout.of(soTimeout, timeUnit); @@ -368,12 +374,13 @@ public Builder setSoTimeout(final int soTimeout, final TimeUnit timeUnit) { } /** - * Determines the default socket timeout value for non-blocking I/O operations. + * Sets the default socket timeout value for non-blocking I/O operations. *

* Default: {@code 0} (no timeout) *

* - * @see java.net.SocketOptions#SO_TIMEOUT + * @return this instance. + * @see SocketOptions#SO_TIMEOUT */ public Builder setSoTimeout(final Timeout soTimeout) { this.soTimeout = soTimeout; @@ -381,13 +388,14 @@ public Builder setSoTimeout(final Timeout soTimeout) { } /** - * Determines the default value of the {@link java.net.SocketOptions#SO_REUSEADDR} parameter + * Sets the default value of the {@link SocketOptions#SO_REUSEADDR} parameter * for newly created sockets. *

* Default: {@code false} *

* - * @see java.net.SocketOptions#SO_REUSEADDR + * @return this instance. + * @see SocketOptions#SO_REUSEADDR */ public Builder setSoReuseAddress(final boolean soReuseAddress) { this.soReuseAddress = soReuseAddress; @@ -395,13 +403,14 @@ public Builder setSoReuseAddress(final boolean soReuseAddress) { } /** - * Determines the default value of the {@link java.net.SocketOptions#SO_LINGER} parameter + * Sets the default value of the {@link SocketOptions#SO_LINGER} parameter * for newly created sockets. *

* Default: {@code -1} *

* - * @see java.net.SocketOptions#SO_LINGER + * @return this instance. + * @see SocketOptions#SO_LINGER */ public Builder setSoLinger(final int soLinger, final TimeUnit timeUnit) { this.soLinger = TimeValue.of(soLinger, timeUnit); @@ -409,13 +418,14 @@ public Builder setSoLinger(final int soLinger, final TimeUnit timeUnit) { } /** - * Determines the default value of the {@link java.net.SocketOptions#SO_LINGER} parameter + * Sets the default value of the {@link SocketOptions#SO_LINGER} parameter * for newly created sockets. *

* Default: {@code -1} *

* - * @see java.net.SocketOptions#SO_LINGER + * @return this instance. + * @see SocketOptions#SO_LINGER */ public Builder setSoLinger(final TimeValue soLinger) { this.soLinger = soLinger; @@ -423,13 +433,14 @@ public Builder setSoLinger(final TimeValue soLinger) { } /** - * Determines the default value of the {@link java.net.SocketOptions#SO_KEEPALIVE} parameter + * Sets the default value of the {@link SocketOptions#SO_KEEPALIVE} parameter * for newly created sockets. *

* Default: {@code -1} *

* - * @see java.net.SocketOptions#SO_KEEPALIVE + * @return this instance. + * @see SocketOptions#SO_KEEPALIVE */ public Builder setSoKeepAlive(final boolean soKeepAlive) { this.soKeepAlive = soKeepAlive; @@ -437,13 +448,14 @@ public Builder setSoKeepAlive(final boolean soKeepAlive) { } /** - * Determines the default value of the {@link java.net.SocketOptions#TCP_NODELAY} parameter + * Sets the default value of the {@link SocketOptions#TCP_NODELAY} parameter * for newly created sockets. *

* Default: {@code false} *

* - * @see java.net.SocketOptions#TCP_NODELAY + * @return this instance. + * @see SocketOptions#TCP_NODELAY */ public Builder setTcpNoDelay(final boolean tcpNoDelay) { this.tcpNoDelay = tcpNoDelay; @@ -451,13 +463,14 @@ public Builder setTcpNoDelay(final boolean tcpNoDelay) { } /** - * Determines the default value of the {@link java.net.SocketOptions#IP_TOS} parameter + * Sets the default value of the {@link SocketOptions#IP_TOS} parameter * for newly created sockets. *

* Default: {@code 0} *

* - * @see java.net.SocketOptions#IP_TOS + * @return this instance. + * @see SocketOptions#IP_TOS * * @since 5.1 */ @@ -467,13 +480,14 @@ public Builder setTrafficClass(final int trafficClass) { } /** - * Determines the default value of the {@link java.net.SocketOptions#SO_SNDBUF} parameter + * Sets the default value of the {@link SocketOptions#SO_SNDBUF} parameter * for newly created sockets. *

* Default: {@code 0} (system default) *

* - * @see java.net.SocketOptions#SO_SNDBUF + * @return this instance. + * @see SocketOptions#SO_SNDBUF */ public Builder setSndBufSize(final int sndBufSize) { this.sndBufSize = sndBufSize; @@ -481,13 +495,14 @@ public Builder setSndBufSize(final int sndBufSize) { } /** - * Determines the default value of the {@link java.net.SocketOptions#SO_RCVBUF} parameter + * Sets the default value of the {@link SocketOptions#SO_RCVBUF} parameter * for newly created sockets. *

* Default: {@code 0} (system default) *

* - * @see java.net.SocketOptions#SO_RCVBUF + * @return this instance. + * @see SocketOptions#SO_RCVBUF */ public Builder setRcvBufSize(final int rcvBufSize) { this.rcvBufSize = rcvBufSize; @@ -495,11 +510,12 @@ public Builder setRcvBufSize(final int rcvBufSize) { } /** - * Determines the default backlog size value for server sockets binds. + * Sets the default backlog size value for server sockets binds. *

* Default: {@code 0} (system default) *

* + * @return this instance. * @since 4.4 */ public Builder setBacklogSize(final int backlogSize) { @@ -508,9 +524,10 @@ public Builder setBacklogSize(final int backlogSize) { } /** - * Determines the time (in seconds) the connection needs to remain idle before TCP starts + * Sets the time (in seconds) the connection needs to remain idle before TCP starts * sending keepalive probes. * + * @return this instance. * @since 5.3 */ public Builder setTcpKeepIdle(final int tcpKeepIdle) { @@ -519,8 +536,9 @@ public Builder setTcpKeepIdle(final int tcpKeepIdle) { } /** - * Determines the time (in seconds) between individual keepalive probes. + * Sets the time (in seconds) between individual keepalive probes. * + * @return this instance. * @since 5.3 */ public Builder setTcpKeepInterval(final int tcpKeepInterval) { @@ -529,8 +547,9 @@ public Builder setTcpKeepInterval(final int tcpKeepInterval) { } /** - * Determines the maximum number of keepalive probes TCP should send before dropping the connection. + * Sets the maximum number of keepalive probes TCP should send before dropping the connection. * + * @return this instance. * @since 5.3 */ public Builder setTcpKeepCount(final int tcpKeepCount) { @@ -539,7 +558,9 @@ public Builder setTcpKeepCount(final int tcpKeepCount) { } /** - * The address of the SOCKS proxy to use. + * Sets the address of the SOCKS proxy to use. + * + * @return this instance. */ public Builder setSocksProxyAddress(final SocketAddress socksProxyAddress) { this.socksProxyAddress = socksProxyAddress; @@ -547,7 +568,9 @@ public Builder setSocksProxyAddress(final SocketAddress socksProxyAddress) { } /** - * The username to provide to the SOCKS proxy for username/password authentication. + * Sets the username to provide to the SOCKS proxy for username/password authentication. + * + * @return this instance. */ public Builder setSocksProxyUsername(final String socksProxyUsername) { this.socksProxyUsername = socksProxyUsername; @@ -555,7 +578,9 @@ public Builder setSocksProxyUsername(final String socksProxyUsername) { } /** - * The password to provide to the SOCKS proxy for username/password authentication. + * Sets the password to provide to the SOCKS proxy for username/password authentication. + * + * @return this instance. */ public Builder setSocksProxyPassword(final String socksProxyPassword) { this.socksProxyPassword = socksProxyPassword; diff --git a/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java b/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java index 710ae87103..78ea2d4391 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java @@ -124,7 +124,7 @@ public SSLContextBuilder() { * "https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#SSLContext">Java * Cryptography Architecture Standard Algorithm Name * Documentation for more information. - * @return this builder + * @return this instance. * @see Java * Cryptography Architecture Standard Algorithm Name Documentation @@ -147,7 +147,7 @@ public SSLContextBuilder setProvider(final String name) { /** * Sets the JCA provider to use for creating trust stores. * @param provider provider to use for creating trust stores. - * @return this builder + * @return this instance. * @since 5.2 */ public SSLContextBuilder setTrustStoreProvider(final Provider provider) { @@ -158,7 +158,7 @@ public SSLContextBuilder setTrustStoreProvider(final Provider provider) { /** * Sets the JCA provider name to use for creating trust stores. * @param name Name of the provider to use for creating trust stores, the provider must be registered with the JCA. - * @return this builder + * @return this instance. * @since 5.2 */ public SSLContextBuilder setTrustStoreProvider(final String name) throws NoSuchProviderException { @@ -169,7 +169,7 @@ public SSLContextBuilder setTrustStoreProvider(final String name) throws NoSuchP /** * Sets the JCA provider to use for creating key stores. * @param provider provider to use for creating key stores. - * @return this builder + * @return this instance. * @since 5.2 */ public SSLContextBuilder setKeyStoreProvider(final Provider provider) { @@ -180,7 +180,7 @@ public SSLContextBuilder setKeyStoreProvider(final Provider provider) { /** * Sets the JCA provider name to use for creating key stores. * @param name Name of the provider to use for creating key stores, the provider must be registered with the JCA. - * @return this builder + * @return this instance. * @since 5.2 */ public SSLContextBuilder setKeyStoreProvider(final String name) throws NoSuchProviderException { @@ -197,7 +197,7 @@ public SSLContextBuilder setKeyStoreProvider(final String name) throws NoSuchPro * "https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#KeyStore">Java * Cryptography Architecture Standard Algorithm Name * Documentation for more information. - * @return this builder + * @return this instance. * @see Java * Cryptography Architecture Standard Algorithm Name Documentation @@ -217,7 +217,7 @@ public SSLContextBuilder setKeyStoreType(final String keyStoreType) { * "https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#KeyManagerFactory">Java * Cryptography Architecture Standard Algorithm Name * Documentation for more information. - * @return this builder + * @return this instance. * @see Java * Cryptography Architecture Standard Algorithm Name Documentation @@ -237,7 +237,7 @@ public SSLContextBuilder setKeyManagerFactoryAlgorithm(final String keyManagerFa * "https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#TrustManagerFactory">Java * Cryptography Architecture Standard Algorithm Name * Documentation for more information. - * @return this builder + * @return this instance. * @see Java * Cryptography Architecture Standard Algorithm Name Documentation @@ -257,6 +257,7 @@ public SSLContextBuilder setSecureRandom(final SecureRandom secureRandom) { * @param trustStrategy * custom trust strategy to use; can be {@code null} in which case * only the default trust managers will be used + * @return this instance. */ public SSLContextBuilder loadTrustMaterial( final KeyStore trustStore, @@ -285,6 +286,7 @@ public SSLContextBuilder loadTrustMaterial( } /** + * @return this instance. * @since 5.2 */ public SSLContextBuilder loadTrustMaterial( @@ -293,6 +295,7 @@ public SSLContextBuilder loadTrustMaterial( } /** + * @return this instance. * @since 5.2 */ public SSLContextBuilder loadTrustMaterial( @@ -302,6 +305,7 @@ public SSLContextBuilder loadTrustMaterial( } /** + * @return this instance. * @since 5.2 */ public SSLContextBuilder loadTrustMaterial( @@ -380,6 +384,7 @@ public SSLContextBuilder loadKeyMaterial( } /** + * @return this instance. * @since 5.2 */ public SSLContextBuilder loadKeyMaterial( @@ -391,6 +396,7 @@ public SSLContextBuilder loadKeyMaterial( } /** + * @return this instance. * @since 5.2 */ public SSLContextBuilder loadKeyMaterial( diff --git a/httpcore5/src/main/java/org/apache/hc/core5/util/VersionInfo.java b/httpcore5/src/main/java/org/apache/hc/core5/util/VersionInfo.java index 7801efba4d..edcb6b5663 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/util/VersionInfo.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/util/VersionInfo.java @@ -261,7 +261,7 @@ public static VersionInfo loadVersionInfo(final String pckg, final ClassLoader c * * @param pckg the package for the version information * @param info the map from string keys to string values, - * for example {@link java.util.Properties} + * for example {@link Properties} * @param clsldr the classloader, or {@code null} * * @return the version information diff --git a/httpcore5/src/test/java/org/apache/hc/core5/http/impl/io/TimeoutByteArrayInputStream.java b/httpcore5/src/test/java/org/apache/hc/core5/http/impl/io/TimeoutByteArrayInputStream.java index 50e6873b20..b27632d40c 100644 --- a/httpcore5/src/test/java/org/apache/hc/core5/http/impl/io/TimeoutByteArrayInputStream.java +++ b/httpcore5/src/test/java/org/apache/hc/core5/http/impl/io/TimeoutByteArrayInputStream.java @@ -32,7 +32,7 @@ import java.io.InterruptedIOException; /** - * Test class similar to {@link java.io.ByteArrayInputStream} that throws if encounters + * Test class similar to {@link ByteArrayInputStream} that throws if encounters * value zero '\000' in the source byte array. */ class TimeoutByteArrayInputStream extends InputStream { diff --git a/httpcore5/src/test/java/org/apache/hc/core5/http/message/TestBasicHeaderIterator.java b/httpcore5/src/test/java/org/apache/hc/core5/http/message/TestBasicHeaderIterator.java index 421650ab45..62cbc8c72f 100644 --- a/httpcore5/src/test/java/org/apache/hc/core5/http/message/TestBasicHeaderIterator.java +++ b/httpcore5/src/test/java/org/apache/hc/core5/http/message/TestBasicHeaderIterator.java @@ -35,7 +35,7 @@ /** - * Tests for {@link java.util.Iterator} of {@link org.apache.hc.core5.http.Header}s. + * Tests for {@link Iterator} of {@link org.apache.hc.core5.http.Header}s. * */ class TestBasicHeaderIterator {