From 0b773a9423b37b1f6f082f34136eb64a46fd3b81 Mon Sep 17 00:00:00 2001 From: gered Date: Wed, 5 Mar 2014 18:31:19 -0500 Subject: [PATCH] don't convert objects to maps when converting from java to clojure --- src/clj_jtwig/convert.clj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/clj_jtwig/convert.clj b/src/clj_jtwig/convert.clj index 447ae2f..c0c6cc0 100644 --- a/src/clj_jtwig/convert.clj +++ b/src/clj_jtwig/convert.clj @@ -46,8 +46,11 @@ java.lang.Object (to-clojure [x] - (-> x - (bean) ; TODO: this is definitely not the fastest method ... + x + ; on second thought, it's probably almost always a better idea to pass the unaltered object to the function + ; and let the actual function itself decide if it wants the object as a map or not... + #_(-> x + (bean) (dissoc :class))) nil