Skip to content

Commit

Permalink
Type hint the servlet request
Browse files Browse the repository at this point in the history
Then we get String for free
  • Loading branch information
MichaelBlume committed Jun 9, 2015
1 parent d504931 commit 542ab91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/leiningen/ring/war.clj
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@
(if (get-in project [:ring :servlet-path-info?] true)
`(let [handler# ~(generate-resolve handler-sym)]
(fn [request#]
(let [context# ^String (.getContextPath (:servlet-request request#))]
(let [context# (.getContextPath
^javax.servlet.http.HttpServletRequest
(:servlet-request request#))]
(handler#
(assoc request#
:context context#
Expand Down

0 comments on commit 542ab91

Please sign in to comment.