Skip to content

Commit 621ecb4

Browse files
committed
Eliminate a few runtime reflections
1 parent 1db4a9a commit 621ecb4

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/aleph/http.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
[manifold.deferred :as d]
1616
[manifold.executor :as executor])
1717
(:import
18+
(aleph.http.core
19+
HeaderMap)
1820
(aleph.utils
1921
ConnectionTimeoutException
2022
PoolTimeoutException
@@ -500,7 +502,7 @@
500502
(defn get-all
501503
"Given a header map from an HTTP request or response, returns a collection of
502504
values associated with the key, rather than a comma-delimited string."
503-
[header-m ^String k]
505+
[^HeaderMap header-m ^String k]
504506
(let [raw-headers (.headers header-m)]
505507
(condp instance? raw-headers
506508
HttpHeaders (.getAll ^HttpHeaders raw-headers k)

src/aleph/http/client_middleware.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
[manifold.stream :as s]
1515
[potemkin :as p])
1616
(:import
17+
(aleph.http.core
18+
HeaderMap)
1719
(io.netty.buffer
1820
ByteBuf
1921
Unpooled)
@@ -746,7 +748,7 @@
746748
(defn ^:no-doc extract-cookies-from-response-headers
747749
([headers]
748750
(extract-cookies-from-response-headers default-cookie-spec headers))
749-
([cookie-spec header-m]
751+
([cookie-spec ^HeaderMap header-m]
750752
(let [raw-headers (.headers header-m)]
751753
(->> (condp instance? raw-headers
752754
HttpHeaders (.getAll ^HttpHeaders raw-headers set-cookie-header-name)

src/aleph/http/server.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@
633633

634634
(defn make-pipeline-builder
635635
"Returns a function that initializes a new server channel's pipeline."
636-
[handler {:keys [ssl? ssl-context use-h2c?] :as opts}]
636+
[handler {:keys [ssl? ^SslContext ssl-context use-h2c?] :as opts}]
637637
(fn pipeline-builder*
638638
[^ChannelPipeline pipeline]
639639
(log/trace "pipeline-builder*" pipeline opts)

0 commit comments

Comments
 (0)