Skip to content

Commit 9d814d4

Browse files
committed
avoid reflection
1 parent 10d37e1 commit 9d814d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/compojure/api/middleware.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
(assoc-in [:meta :produces] (map mime-types response-formats))
7777
handler)))
7878

79-
(defn handle-req-error [e handler req]
79+
(defn handle-req-error [^Throwable e handler req]
8080
(cond
8181
(instance? JsonParseException e)
8282
(bad-request {:type "json-parse-exception"

src/compojure/api/swagger.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
(defn strip-trailing-spaces [s] (st/replace-first s #"(.)\/+$" "$1"))
104104

105105
(defn create-api-route [[ks v]]
106-
[{:method (keyword (.getName (first (keep second ks))))
106+
[{:method (keyword (name (first (keep second ks))))
107107
:uri (->> ks (map first) (map remove-param-regexes) st/join strip-trailing-spaces)} v])
108108

109109
(defn extract-method [body]

0 commit comments

Comments
 (0)