From 5d55e404270a34b5cc9ffa43a698cb0bffa069f9 Mon Sep 17 00:00:00 2001 From: mikub Date: Sat, 18 Jul 2020 13:00:34 +0200 Subject: [PATCH] fix to issue #8 - java lambda is now taking java.util.Map as a parameter, not clojure.lang.PersistentArrayMap --- src/clj/titanoboa/exp.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/clj/titanoboa/exp.clj b/src/clj/titanoboa/exp.clj index 0809b07..391c070 100644 --- a/src/clj/titanoboa/exp.clj +++ b/src/clj/titanoboa/exp.clj @@ -93,7 +93,7 @@ *properties* properties] ;;TODO bind *job* and *properties* based on some test data (try (if (= "java" type) (-> java-lambda-factory - (.createLambdaUnchecked s (DynamicTypeReference. "Function< clojure.lang.PersistentArrayMap, java.util.Map>")) + (.createLambdaUnchecked s (DynamicTypeReference. "Function< java.util.Map, java.util.Map>")) (.apply (eval-properties properties {}))) (load-string s)) (catch Exception e @@ -119,7 +119,7 @@ ([expr arg1] (cond (java-expression? expr) (do (when-not (string? (:value expr)) (throw (java.lang.IllegalStateException. "Value of java lambda expression must be String!"))) (-> java-lambda-factory - (.createLambdaUnchecked (:value expr) (DynamicTypeReference. "Function< clojure.lang.PersistentArrayMap, java.util.Map>")) + (.createLambdaUnchecked (:value expr) (DynamicTypeReference. "Function< java.util.Map, java.util.Map>")) (.apply arg1))) :else (-> expr eval-exfn @@ -128,7 +128,7 @@ ([expr arg1 arg2] (cond (java-expression? expr) (do (when-not (string? (:value expr)) (throw (java.lang.IllegalStateException. "Value of java lambda expression must be String!"))) (-> java-lambda-factory - (.createLambdaUnchecked (:value expr) (DynamicTypeReference. "Function< clojure.lang.PersistentArrayMap, java.util.Map>")) + (.createLambdaUnchecked (:value expr) (DynamicTypeReference. "Function< java.util.Map, java.util.Map>")) (.apply arg1 arg2))) :else (-> expr eval-exfn