File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 32
32
[cljs.tools.reader :as reader]
33
33
[cljs.tools.reader.reader-types :as readers]
34
34
[cljs.reader :as edn]))
35
- #? (:clj (:import [java.io File Reader PushbackReader FileOutputStream FileInputStream ]
35
+ #? (:clj (:import [java.io File Reader PushbackReader]
36
36
[java.util.regex Pattern]
37
37
[java.net URL]
38
38
[java.lang Throwable]
4520
4520
(str " ;; Analyzed by ClojureScript " (util/clojurescript-version ) " \n "
4521
4521
(pr-str analysis)))
4522
4522
" json" (when-let [{:keys [writer write]} @transit]
4523
- (write
4524
- (writer (FileOutputStream. cache-file) :json
4525
- transit-write-opts)
4526
- analysis))))
4523
+ (with-open [os (io/output-stream cache-file)]
4524
+ (write (writer os :json transit-write-opts) analysis)))))
4527
4525
(when src
4528
4526
(.setLastModified ^File cache-file (util/last-modified src))))))
4529
4527
You can’t perform that action at this time.
0 commit comments