From ac036802f0b25d57d540365302fd7cec9b52acf7 Mon Sep 17 00:00:00 2001 From: Steve Miner Date: Wed, 18 Jun 2014 16:31:28 -0400 Subject: [PATCH] fix a couple of reflection warnings --- src/me/raynes/fs.clj | 2 +- src/me/raynes/fs/compression.clj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/me/raynes/fs.clj b/src/me/raynes/fs.clj index b32abc5..998b64a 100644 --- a/src/me/raynes/fs.clj +++ b/src/me/raynes/fs.clj @@ -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" diff --git a/src/me/raynes/fs/compression.clj b/src/me/raynes/fs/compression.clj index 329aa6c..9093c21 100644 --- a/src/me/raynes/fs/compression.clj +++ b/src/me/raynes/fs/compression.clj @@ -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)))