Skip to content

Commit 8d8d7e4

Browse files
committed
Merge pull request #77 from MichaelBlume/avoid-reflection
avoid reflection
2 parents 31a1c70 + 9d814d4 commit 8d8d7e4

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
@@ -94,7 +94,7 @@
9494
(defn strip-trailing-spaces [s] (st/replace-first s #"(.)\/+$" "$1"))
9595

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

100100
(defn extract-method [body]

0 commit comments

Comments
 (0)