Commits

Miki Tebeka committed ee4f636 Merge

Merge pull request #1 from craig-ludington/fix-file-descriptor-leak

Fix file descriptor leak in the digest method with a File argument.

Comments (0)

Files changed (1)

   (digest algorithm [message]))
 
 (defmethod digest File [algorithm ^File file]
-  (digest algorithm (FileInputStream. file)))
+  (with-open [f (FileInputStream. file)]
+    (digest algorithm f)))
 
 (defmethod digest InputStream [algorithm ^InputStream reader]
   (digest algorithm (byte-seq reader)))