Skip to content

Commit

Permalink
fix a couple of reflection warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
miner committed Jun 18, 2014
1 parent 1672b52 commit ac03680
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/me/raynes/fs.clj
Expand Up @@ -514,7 +514,7 @@
(defn find-files
"Find files matching given pattern."
[path pattern]
(find-files* path #(re-matches pattern (.getName %))))
(find-files* path #(re-matches pattern (.getName ^File %))))

(defn exec
"Execute a shell command in the current directory"
Expand Down
4 changes: 2 additions & 2 deletions src/me/raynes/fs/compression.clj
Expand Up @@ -24,12 +24,12 @@

(defn- add-zip-entry
"Add a zip entry. Works for strings and byte-arrays."
[zip-output-stream [name content & remain]]
[^java.util.zip.ZipOutputStream zip-output-stream [^String name content & remain]]
(.putNextEntry zip-output-stream (java.util.zip.ZipEntry. name))
(if (string? content) ;string and byte-array must have different methods
(doto (java.io.PrintStream. zip-output-stream true)
(.print content))
(.write zip-output-stream content))
(.write zip-output-stream ^bytes content))
(.closeEntry zip-output-stream)
(when (seq (drop 1 remain))
(recur zip-output-stream remain)))
Expand Down

0 comments on commit ac03680

Please sign in to comment.