From 96d5b4a66fc2cc5fd73850f9932b163c56cf776c Mon Sep 17 00:00:00 2001 From: "Michael S. Klishin" Date: Sun, 19 Feb 2012 05:32:50 +0400 Subject: [PATCH] Eliminate recently introduced reflection warnings --- src/monger/collection.clj | 2 +- test/monger/test/db.clj | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/monger/collection.clj b/src/monger/collection.clj index 2c7585c..be130ff 100644 --- a/src/monger/collection.clj +++ b/src/monger/collection.clj @@ -26,7 +26,7 @@ (zipmap fields (repeat 1))) (definline check-not-nil! - [ref message] + [ref ^String message] `(when (nil? ~ref) (throw (IllegalArgumentException. ~message)))) diff --git a/test/monger/test/db.clj b/test/monger/test/db.clj index c03b728..f6e3793 100644 --- a/test/monger/test/db.clj +++ b/test/monger/test/db.clj @@ -2,7 +2,8 @@ (:require [monger core db] [monger.test.helper :as helper] [monger.collection :as mgcol]) - (:import (com.mongodb Mongo DB)) + (:import [com.mongodb Mongo DB] + [java.util Set]) (:use [clojure.test])) (helper/connect!) @@ -34,6 +35,6 @@ (deftest test-get-collection-names (mgcol/insert "test-1" { :name "Clojure" }) (mgcol/insert "test-2" { :name "Clojure" }) - (let [collections (monger.db/get-collection-names)] + (let [^Set collections (monger.db/get-collection-names)] (is (.contains collections "test-1")) (is (.contains collections "test-2"))))