diff --git a/modules/reitit-core/src/reitit/impl.cljc b/modules/reitit-core/src/reitit/impl.cljc index 44424b88..540e7148 100644 --- a/modules/reitit-core/src/reitit/impl.cljc +++ b/modules/reitit-core/src/reitit/impl.cljc @@ -149,7 +149,7 @@ #?(:clj (def +percents+ (into [] (map #(format "%%%02X" %) (range 0 256))))) -#?(:clj (defn byte->percent [byte] +#?(:clj (defn byte->percent [^long byte] (nth +percents+ (if (< byte 0) (+ 256 byte) byte)))) #?(:clj (defn percent-encode [^String s] diff --git a/modules/reitit-core/src/reitit/interceptor.cljc b/modules/reitit-core/src/reitit/interceptor.cljc index e3d4f3c9..a89f455d 100644 --- a/modules/reitit-core/src/reitit/interceptor.cljc +++ b/modules/reitit-core/src/reitit/interceptor.cljc @@ -83,8 +83,8 @@ (if-not compile this (let [compiled (::compiled opts 0) - opts (assoc opts ::compiled (inc compiled))] - (when (>= compiled *max-compile-depth*) + opts (assoc opts ::compiled (inc ^long compiled))] + (when (>= ^long compiled ^long *max-compile-depth*) (throw (ex-info (str "Too deep Interceptor compilation - " compiled) diff --git a/modules/reitit-core/src/reitit/middleware.cljc b/modules/reitit-core/src/reitit/middleware.cljc index 1d70f314..f3515684 100644 --- a/modules/reitit-core/src/reitit/middleware.cljc +++ b/modules/reitit-core/src/reitit/middleware.cljc @@ -59,8 +59,8 @@ (if-not compile this (let [compiled (::compiled opts 0) - opts (assoc opts ::compiled (inc compiled))] - (when (>= compiled *max-compile-depth*) + opts (assoc opts ::compiled (inc ^long compiled))] + (when (>= ^long compiled ^long *max-compile-depth*) (throw (ex-info (str "Too deep Middleware compilation - " compiled) diff --git a/modules/reitit-core/src/reitit/segment.cljc b/modules/reitit-core/src/reitit/segment.cljc index c317a71a..a12f06f9 100644 --- a/modules/reitit-core/src/reitit/segment.cljc +++ b/modules/reitit-core/src/reitit/segment.cljc @@ -57,7 +57,7 @@ (defn compile [trie] "Compiles the Trie so that [[lookup]] can be used." #?(:cljs trie - :clj (.matcher ^SegmentTrie (or trie (SegmentTrie.))))) + :clj (.matcher (or ^SegmentTrie trie (SegmentTrie.))))) (defn scanner [compiled-tries] "Returns a new compiled trie that does linear scan on the given compiled tries on [[lookup]]."