From f2e9ad3b117ef5b1b250d8f1e121f67899045e0e Mon Sep 17 00:00:00 2001 From: Arturo Bernal Date: Tue, 9 Feb 2021 07:26:05 +0100 Subject: [PATCH] Fix Typo --- .../hc/client5/http/cache/HttpAsyncCacheStorageAdaptor.java | 4 ++-- .../impl/cache/AbstractSerializingAsyncCacheStorage.java | 6 +++--- .../org/apache/hc/client5/http/impl/cache/FileResource.java | 4 ++-- .../org/apache/hc/client5/http/impl/cache/HeapResource.java | 2 +- .../hc/client5/http/impl/async/AsyncRedirectExec.java | 2 +- .../hc/client5/http/impl/async/H2AsyncClientBuilder.java | 2 +- .../hc/client5/http/impl/cookie/BasicDomainHandler.java | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/cache/HttpAsyncCacheStorageAdaptor.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/cache/HttpAsyncCacheStorageAdaptor.java index 7f1e525b31..2178a62bb1 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/cache/HttpAsyncCacheStorageAdaptor.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/cache/HttpAsyncCacheStorageAdaptor.java @@ -48,13 +48,13 @@ public final class HttpAsyncCacheStorageAdaptor implements HttpAsyncCacheStorage private final HttpCacheStorage cacheStorage; public HttpAsyncCacheStorageAdaptor(final HttpCacheStorage cacheStorage) { - this.cacheStorage = Args.notNull(cacheStorage, "Cache strorage"); + this.cacheStorage = Args.notNull(cacheStorage, "Cache storage"); } @Override public Cancellable putEntry(final String key, final HttpCacheEntry entry, final FutureCallback callback) { Args.notEmpty(key, "Key"); - Args.notNull(entry, "Cache ehtry"); + Args.notNull(entry, "Cache entry"); Args.notNull(callback, "Callback"); try { cacheStorage.putEntry(key, entry); diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AbstractSerializingAsyncCacheStorage.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AbstractSerializingAsyncCacheStorage.java index 81c21fadae..0263a6d512 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AbstractSerializingAsyncCacheStorage.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AbstractSerializingAsyncCacheStorage.java @@ -156,11 +156,11 @@ public final Cancellable updateEntry( Args.notNull(callback, "Callback"); final ComplexCancellable complexCancellable = new ComplexCancellable(); final AtomicInteger count = new AtomicInteger(0); - atemmptUpdateEntry(key, casOperation, complexCancellable, count, callback); + attemptUpdateEntry(key, casOperation, complexCancellable, count, callback); return complexCancellable; } - private void atemmptUpdateEntry( + private void attemptUpdateEntry( final String key, final HttpCacheCASOperation casOperation, final ComplexCancellable complexCancellable, @@ -195,7 +195,7 @@ public void completed(final Boolean result) { if (numRetries >= maxUpdateRetries) { callback.failed(new HttpCacheUpdateException("Cache update failed after " + numRetries + " retries")); } else { - atemmptUpdateEntry(key, casOperation, complexCancellable, count, callback); + attemptUpdateEntry(key, casOperation, complexCancellable, count, callback); } } } diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/FileResource.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/FileResource.java index cd240a6bf2..69ed1a412f 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/FileResource.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/FileResource.java @@ -68,7 +68,7 @@ File getFile() { public byte[] get() throws ResourceIOException { final File file = this.fileRef.get(); if (file == null) { - throw new ResourceIOException("Resouce already dispoased"); + throw new ResourceIOException("Resource already disposed"); } try (final InputStream in = new FileInputStream(file)) { final ByteArrayBuffer buf = new ByteArrayBuffer(1024); @@ -93,7 +93,7 @@ public InputStream getInputStream() throws ResourceIOException { throw new ResourceIOException(ex.getMessage(), ex); } } - throw new ResourceIOException("Resouce already dispoased"); + throw new ResourceIOException("Resource already disposed"); } @Override diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/HeapResource.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/HeapResource.java index 5c7aab1069..8a23e3916f 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/HeapResource.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/HeapResource.java @@ -56,7 +56,7 @@ public byte[] get() throws ResourceIOException { if (byteArray != null) { return byteArray; } - throw new ResourceIOException("Resouce already dispoased"); + throw new ResourceIOException("Resource already disposed"); } @Override diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRedirectExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRedirectExec.java index ea45683034..a9cd356f0b 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRedirectExec.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRedirectExec.java @@ -62,7 +62,7 @@ /** * Request execution handler in the asynchronous request execution chain - * responsbile for handling of request redirects. + * responsible for handling of request redirects. *

* Further responsibilities such as communication with the opposite * endpoint is delegated to the next executor in the request execution diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java index 4cb691c8f1..fa3f0e03ee 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java @@ -558,7 +558,7 @@ public final H2AsyncClientBuilder disableAuthCaching() { * One MUST explicitly close HttpClient with {@link CloseableHttpAsyncClient#close()} * in order to stop and release the background thread. *

- * Please note this method has no effect if the instance of HttpClient is configuted to + * Please note this method has no effect if the instance of HttpClient is configured to * use a shared connection manager. * * @param maxIdleTime maximum time persistent connections can stay idle while kept alive diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/BasicDomainHandler.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/BasicDomainHandler.java index ffaa0f06e8..fd3cc51b14 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/BasicDomainHandler.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/BasicDomainHandler.java @@ -99,7 +99,7 @@ static boolean domainMatch(final String domain, final String host) { final String normalizedDomain = domain.startsWith(".") ? domain.substring(1) : domain; if (host.endsWith(normalizedDomain)) { final int prefix = host.length() - normalizedDomain.length(); - // Either a full match or a prefix endidng with a '.' + // Either a full match or a prefix ending with a '.' if (prefix == 0) { return true; }