File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
src/cider/nrepl/middleware
test/clj/cider/nrepl/middleware Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## master (unreleased)
4
4
5
+ ### Bugs fixed
6
+
7
+ * [ #667 ] ( https://github.com/clojure-emacs/cider-nrepl/pull/667 ) : Filter non file urls from classpath response.
8
+
5
9
## 0.25.2 (2020-06-07)
6
10
7
11
### Bugs fixed
Original file line number Diff line number Diff line change 2
2
(:require
3
3
[cider.nrepl.middleware.util.error-handling :refer [with-safe-transport]]
4
4
[clojure.java.io :as io]
5
- [orchard.java.classpath :as cp]))
5
+ [orchard.java.classpath :as cp]
6
+ [orchard.misc :as misc]))
7
+
8
+ (defn file-url?
9
+ [u]
10
+ (and (misc/url? u)
11
+ (= (.getProtocol ^java.net.URL u) " file" )))
6
12
7
13
(defn classpath-reply [msg]
8
14
{:classpath (->> (cp/classpath )
15
+ (filter file-url?)
9
16
(map io/as-file)
10
17
(map str))})
11
18
Original file line number Diff line number Diff line change 21
21
(is (.startsWith (:err response) " java.lang.Exception: cp error" ))
22
22
(is (= (:ex response) " class java.lang.Exception" ))
23
23
(is (:pp-stacktrace response)))))
24
+
25
+ (deftest file-url?-test
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" )))))
You can’t perform that action at this time.
0 commit comments