File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/cider/nrepl/middleware
test/clj/cider/nrepl/middleware Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 12
12
[nrepl.transport :as transport])
13
13
(:import
14
14
(java.io ByteArrayOutputStream FileNotFoundException InputStream)
15
- (java.net MalformedURLException URL URLConnection)
15
+ (java.net MalformedURLException URI URL URLConnection)
16
16
(java.nio.file Files Path Paths)
17
17
(java.util Base64)))
18
18
82
82
(defn slurp-url-to-content+body
83
83
" Attempts to parse and then to slurp a URL, producing a content-typed response."
84
84
[url-str]
85
- (when-let [^URL url (try (URL. url-str)
85
+ (when-let [^URL url (try (.toURL ( URI. url-str) )
86
86
(catch MalformedURLException _e nil ))]
87
87
(if (= (.getProtocol url) " file" ) ; ; expected common case
88
88
(let [^Path p (Paths/get (.toURI url))
Original file line number Diff line number Diff line change 24
24
25
25
(deftest file-url?-test
26
26
(is (file-url? (.toURL (.toURI (java.io.File. " " )))))
27
- (is (not (file-url? (java.net.URL . " jar:file:/tmp/test.jar!/BOOT-INF/classes" )))))
27
+ (is (not (file-url? (.toURL ( java.net.URI . " jar:file:/tmp/test.jar!/BOOT-INF/classes" ) )))))
You can’t perform that action at this time.
0 commit comments