This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-http.git
The following commit(s) were added to refs/heads/main by this push:
new cb475eba6 chore:Fix some code inspection errors.
cb475eba6 is described below
commit cb475eba6e975bc1937c988abe854e121dfdabfb
Author: He-Pin <[email protected]>
AuthorDate: Wed Jan 10 19:30:59 2024 +0800
chore:Fix some code inspection errors.
---
.../src/main/java/org/apache/pekko/http/javadsl/model/Authority.java | 4 ++--
.../apache/pekko/http/shaded/com/twitter/hpack/HuffmanEncoder.java | 3 ---
.../org/apache/pekko/http/shaded/com/twitter/hpack/StaticTable.java | 2 +-
.../pekko/http/javadsl/server/examples/simple/SimpleServerApp.java | 1 -
4 files changed, 3 insertions(+), 7 deletions(-)
diff --git
a/http-core/src/main/java/org/apache/pekko/http/javadsl/model/Authority.java
b/http-core/src/main/java/org/apache/pekko/http/javadsl/model/Authority.java
index 13f911986..d1aae751b 100644
--- a/http-core/src/main/java/org/apache/pekko/http/javadsl/model/Authority.java
+++ b/http-core/src/main/java/org/apache/pekko/http/javadsl/model/Authority.java
@@ -13,7 +13,7 @@
package org.apache.pekko.http.javadsl.model;
-import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
/** Represents a hostname, port and user info. */
public abstract class Authority {
@@ -40,7 +40,7 @@ public abstract class Authority {
public static Authority create(String authority) {
return org.apache.pekko.http.scaladsl.model.Uri.Authority$.MODULE$.parse(
org.parboiled2.ParserInput$.MODULE$.apply(authority),
- Charset.forName("UTF8"),
+ StandardCharsets.UTF_8,
org.apache.pekko.http.scaladsl.model.Uri$ParsingMode$Relaxed$.MODULE$);
}
}
diff --git
a/http-core/src/main/java/org/apache/pekko/http/shaded/com/twitter/hpack/HuffmanEncoder.java
b/http-core/src/main/java/org/apache/pekko/http/shaded/com/twitter/hpack/HuffmanEncoder.java
index bad55a203..7b8771e8e 100644
---
a/http-core/src/main/java/org/apache/pekko/http/shaded/com/twitter/hpack/HuffmanEncoder.java
+++
b/http-core/src/main/java/org/apache/pekko/http/shaded/com/twitter/hpack/HuffmanEncoder.java
@@ -54,9 +54,6 @@ final class HuffmanEncoder {
* Compresses the input string literal using the Huffman coding.
*
* @param out the output stream for the compressed data
- * @param data the string literal to be Huffman encoded
- * @param off the start offset in the data
- * @param len the number of bytes to encode
* @throws IOException if an I/O error occurs. In particular, an
<code>IOException</code> may be
* thrown if the output stream has been closed.
*/
diff --git
a/http-core/src/main/java/org/apache/pekko/http/shaded/com/twitter/hpack/StaticTable.java
b/http-core/src/main/java/org/apache/pekko/http/shaded/com/twitter/hpack/StaticTable.java
index b08660c3f..5398bd84c 100644
---
a/http-core/src/main/java/org/apache/pekko/http/shaded/com/twitter/hpack/StaticTable.java
+++
b/http-core/src/main/java/org/apache/pekko/http/shaded/com/twitter/hpack/StaticTable.java
@@ -153,7 +153,7 @@ final class StaticTable {
// create a map of header name to index value to allow quick lookup
private static Map<String, Integer> createMap() {
int length = STATIC_TABLE.size();
- HashMap<String, Integer> ret = new HashMap<String, Integer>(length);
+ HashMap<String, Integer> ret = new HashMap<>(length);
// Iterate through the static table in reverse order to
// save the smallest index for a given name in the map.
for (int index = length; index > 0; index--) {
diff --git
a/http-tests/src/main/java/org/apache/pekko/http/javadsl/server/examples/simple/SimpleServerApp.java
b/http-tests/src/main/java/org/apache/pekko/http/javadsl/server/examples/simple/SimpleServerApp.java
index 188d422e2..c748bcce1 100644
---
a/http-tests/src/main/java/org/apache/pekko/http/javadsl/server/examples/simple/SimpleServerApp.java
+++
b/http-tests/src/main/java/org/apache/pekko/http/javadsl/server/examples/simple/SimpleServerApp.java
@@ -27,7 +27,6 @@ import javax.net.ssl.TrustManagerFactory;
import java.io.IOException;
import java.io.InputStream;
import java.security.*;
-import java.security.cert.CertificateException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.Executor;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]