You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2021/02/09 18:09:35 UTC

[httpcomponents-core] branch master updated: Fix typo

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git


The following commit(s) were added to refs/heads/master by this push:
     new aa9f12c  Fix typo
aa9f12c is described below

commit aa9f12c1267eede5723bebcfe95210e872ccbe22
Author: Arturo Bernal <ar...@gmail.com>
AuthorDate: Tue Feb 9 07:13:23 2021 +0100

    Fix typo
---
 .../apache/hc/core5/http2/impl/io/FrameInputBuffer.java    |  2 +-
 .../apache/hc/core5/http2/impl/io/FrameOutputBuffer.java   |  2 +-
 .../apache/hc/core5/http2/impl/nio/FrameInputBuffer.java   |  2 +-
 .../apache/hc/core5/http2/impl/nio/FrameOutputBuffer.java  |  2 +-
 .../src/main/java/org/apache/hc/core5/http/HttpStatus.java |  2 +-
 .../main/java/org/apache/hc/core5/http/MessageHeaders.java |  4 ++--
 .../hc/core5/http/impl/io/SessionInputBufferImpl.java      |  2 +-
 .../hc/core5/http/impl/io/SessionOutputBufferImpl.java     | 14 +++++++-------
 .../org/apache/hc/core5/reactor/ssl/SSLManagedBuffer.java  |  2 +-
 .../src/main/java/org/apache/hc/core5/util/TimeValue.java  |  2 +-
 10 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/io/FrameInputBuffer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/io/FrameInputBuffer.java
index 60ea590..e390805 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/io/FrameInputBuffer.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/io/FrameInputBuffer.java
@@ -57,7 +57,7 @@ public final class FrameInputBuffer {
     private int dataLen;
 
     FrameInputBuffer(final BasicH2TransportMetrics metrics, final int bufferLen, final int maxFramePayloadSize) {
-        Args.notNull(metrics, "HTTP2 transport metrcis");
+        Args.notNull(metrics, "HTTP2 transport metrics");
         Args.positive(maxFramePayloadSize, "Maximum payload size");
         this.metrics = metrics;
         this.maxFramePayloadSize = maxFramePayloadSize;
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/io/FrameOutputBuffer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/io/FrameOutputBuffer.java
index 93d26ee..52616a3 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/io/FrameOutputBuffer.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/io/FrameOutputBuffer.java
@@ -53,7 +53,7 @@ public final class FrameOutputBuffer {
 
     public FrameOutputBuffer(final BasicH2TransportMetrics metrics, final int maxFramePayloadSize) {
         super();
-        Args.notNull(metrics, "HTTP2 transport metrcis");
+        Args.notNull(metrics, "HTTP2 transport metrics");
         Args.positive(maxFramePayloadSize, "Maximum payload size");
         this.metrics = metrics;
         this.maxFramePayloadSize = maxFramePayloadSize;
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameInputBuffer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameInputBuffer.java
index cb5e381..057c054 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameInputBuffer.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameInputBuffer.java
@@ -62,7 +62,7 @@ public final class FrameInputBuffer {
     private int streamId;
 
     FrameInputBuffer(final BasicH2TransportMetrics metrics, final int bufferLen, final int maxFramePayloadSize) {
-        Args.notNull(metrics, "HTTP2 transport metrcis");
+        Args.notNull(metrics, "HTTP2 transport metrics");
         Args.positive(maxFramePayloadSize, "Maximum payload size");
         this.metrics = metrics;
         this.maxFramePayloadSize = Math.max(maxFramePayloadSize, FrameConsts.MIN_FRAME_SIZE);
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameOutputBuffer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameOutputBuffer.java
index 54f9982..aa76a13 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameOutputBuffer.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/FrameOutputBuffer.java
@@ -51,7 +51,7 @@ public final class FrameOutputBuffer {
     private final ByteBuffer buffer;
 
     public FrameOutputBuffer(final BasicH2TransportMetrics metrics, final int maxFramePayloadSize) {
-        Args.notNull(metrics, "HTTP2 transport metrcis");
+        Args.notNull(metrics, "HTTP2 transport metrics");
         Args.positive(maxFramePayloadSize, "Maximum payload size");
         this.metrics = metrics;
         this.maxFramePayloadSize = maxFramePayloadSize;
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/HttpStatus.java b/httpcore5/src/main/java/org/apache/hc/core5/http/HttpStatus.java
index 7dceafa..02b448c 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/HttpStatus.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/HttpStatus.java
@@ -102,7 +102,7 @@ public final class HttpStatus {
     /** {@code 3xx Redirection} (HTTP/1.1 - RFC 7231) */
     public static final int SC_REDIRECTION = 300;
 
-    /** {@code 300 Mutliple Choices} (HTTP/1.1 - RFC 7231) */
+    /** {@code 300 Multiple Choices} (HTTP/1.1 - RFC 7231) */
     public static final int SC_MULTIPLE_CHOICES = 300;
     /** {@code 301 Moved Permanently} (HTTP/1.0 - RFC 7231) */
     public static final int SC_MOVED_PERMANENTLY = 301;
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/MessageHeaders.java b/httpcore5/src/main/java/org/apache/hc/core5/http/MessageHeaders.java
index 48a16e6..76261cd 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/MessageHeaders.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/MessageHeaders.java
@@ -78,7 +78,7 @@ public interface MessageHeaders {
     Header getHeader(String name) throws ProtocolException;
 
     /**
-     * Returns all the headers of this message. Headers are orderd in the sequence
+     * Returns all the headers of this message. Headers are ordered in the sequence
      * they will be sent over a connection.
      *
      * @return all the headers of this message
@@ -87,7 +87,7 @@ public interface MessageHeaders {
 
     /**
      * Returns all the headers with a specified name of this message. Header values
-     * are ignored. Headers are orderd in the sequence they will be sent over a
+     * are ignored. Headers are ordered in the sequence they will be sent over a
      * connection.
      *
      * @param name the name of the headers to return.
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/SessionInputBufferImpl.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/SessionInputBufferImpl.java
index 8ed9beb..313fb6e 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/SessionInputBufferImpl.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/SessionInputBufferImpl.java
@@ -87,7 +87,7 @@ public class SessionInputBufferImpl implements SessionInputBuffer {
             final int minChunkLimit,
             final int maxLineLen,
             final CharsetDecoder charDecoder) {
-        Args.notNull(metrics, "HTTP transport metrcis");
+        Args.notNull(metrics, "HTTP transport metrics");
         Args.positive(bufferSize, "Buffer size");
         this.metrics = metrics;
         this.buffer = new byte[bufferSize];
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/SessionOutputBufferImpl.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/SessionOutputBufferImpl.java
index 7960499..c186f00 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/SessionOutputBufferImpl.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/SessionOutputBufferImpl.java
@@ -58,7 +58,7 @@ public class SessionOutputBufferImpl implements SessionOutputBuffer {
 
     private final BasicHttpTransportMetrics metrics;
     private final ByteArrayBuffer buffer;
-    private final int fragementSizeHint;
+    private final int fragmentSizeHint;
     private final CharsetEncoder encoder;
 
     private ByteBuffer bbuf;
@@ -68,7 +68,7 @@ public class SessionOutputBufferImpl implements SessionOutputBuffer {
      *
      * @param metrics HTTP transport metrics.
      * @param bufferSize buffer size. Must be a positive number.
-     * @param fragementSizeHint fragment size hint defining a minimal size of a fragment
+     * @param fragmentSizeHint fragment size hint defining a minimal size of a fragment
      *   that should be written out directly to the socket bypassing the session buffer.
      *   Value {@code 0} disables fragment buffering.
      * @param charEncoder charEncoder to be used for encoding HTTP protocol elements.
@@ -77,14 +77,14 @@ public class SessionOutputBufferImpl implements SessionOutputBuffer {
     public SessionOutputBufferImpl(
             final BasicHttpTransportMetrics metrics,
             final int bufferSize,
-            final int fragementSizeHint,
+            final int fragmentSizeHint,
             final CharsetEncoder charEncoder) {
         super();
         Args.positive(bufferSize, "Buffer size");
-        Args.notNull(metrics, "HTTP transport metrcis");
+        Args.notNull(metrics, "HTTP transport metrics");
         this.metrics = metrics;
         this.buffer = new ByteArrayBuffer(bufferSize);
-        this.fragementSizeHint = fragementSizeHint >= 0 ? fragementSizeHint : bufferSize;
+        this.fragmentSizeHint = fragmentSizeHint >= 0 ? fragmentSizeHint : bufferSize;
         this.encoder = charEncoder;
     }
 
@@ -136,7 +136,7 @@ public class SessionOutputBufferImpl implements SessionOutputBuffer {
         // Do not want to buffer large-ish chunks
         // if the byte array is larger then MIN_CHUNK_LIMIT
         // write it directly to the output stream
-        if (len > this.fragementSizeHint || len > this.buffer.capacity()) {
+        if (len > this.fragmentSizeHint || len > this.buffer.capacity()) {
             // flush the buffer
             flushBuffer(outputStream);
             // write directly to the out stream
@@ -165,7 +165,7 @@ public class SessionOutputBufferImpl implements SessionOutputBuffer {
     @Override
     public void write(final int b, final OutputStream outputStream) throws IOException {
         Args.notNull(outputStream, "Output stream");
-        if (this.fragementSizeHint > 0) {
+        if (this.fragmentSizeHint > 0) {
             if (this.buffer.isFull()) {
                 flushBuffer(outputStream);
             }
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLManagedBuffer.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLManagedBuffer.java
index 4c1d2b6..e3d2173 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLManagedBuffer.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLManagedBuffer.java
@@ -35,7 +35,7 @@ abstract class SSLManagedBuffer {
 
     /**
      * Allocates the resources required for this buffer, or returns the resources already allocated for this buffer.
-     * Unless {@link #release() } is called, multiple invokations to this method must return the same
+     * Unless {@link #release() } is called, multiple invocations to this method must return the same
      * {@link java.nio.ByteBuffer}.
      * @return buffer
      */
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java b/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
index 7071a91..c7b303a 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
@@ -141,7 +141,7 @@ public class TimeValue implements Comparable<TimeValue> {
      * Creates a TimeValue.
      *
      * @param duration the time duration in the given {@code timeUnit}.
-     * @param timeUnit the time unit for the given durarion.
+     * @param timeUnit the time unit for the given duration.
      * @return a Timeout
      */
     public static TimeValue of(final long duration, final TimeUnit timeUnit) {