aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'src/clojure/contrib')
-rw-r--r--src/clojure/contrib/jmx/Bean.clj2
-rw-r--r--src/clojure/contrib/test_contrib/test_jmx.clj11
2 files changed, 7 insertions, 6 deletions
diff --git a/src/clojure/contrib/jmx/Bean.clj b/src/clojure/contrib/jmx/Bean.clj
index 1ee8e950..cae67d21 100644
--- a/src/clojure/contrib/jmx/Bean.clj
+++ b/src/clojure/contrib/jmx/Bean.clj
@@ -25,7 +25,7 @@
(defn -getAttribute
[this attr]
- ((.state this) (keyword attr)))
+ (@(.state this) (keyword attr)))
(defn -getAttributes
[this attrs]
diff --git a/src/clojure/contrib/test_contrib/test_jmx.clj b/src/clojure/contrib/test_contrib/test_jmx.clj
index a4013d22..f75c76bf 100644
--- a/src/clojure/contrib/test_contrib/test_jmx.clj
+++ b/src/clojure/contrib/test_contrib/test_jmx.clj
@@ -136,11 +136,12 @@
)))
(deftest test-getAttribute
- (let [state (ref {:a 1 :b 2})
- bean (Bean. state)]
- (testing "accessing values"
- (are [result expr] (= result expr)
- 1 (.getAttribute bean "a")))))
+ (doseq [reftype [ref atom agent]]
+ (let [state (reftype {:a 1 :b 2})
+ bean (Bean. state)]
+ (testing (str "accessing values from a " (class state))
+ (are [result expr] (= result expr)
+ 1 (.getAttribute bean "a"))))))
(deftest test-bean-info
(let [state (ref {:a 1 :b 2})