From 2af45053bbbaa340111bbf4f353ab9ce8165064d Mon Sep 17 00:00:00 2001 From: JarrodCTaylor Date: Mon, 11 Mar 2024 16:15:12 -0500 Subject: [PATCH] TRDR-72 Added type hint to suppress reflection warning --- src/main/clojure/clojure/tools/reader.clj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/clojure/clojure/tools/reader.clj b/src/main/clojure/clojure/tools/reader.clj index 70f212d..ee9d784 100644 --- a/src/main/clojure/clojure/tools/reader.clj +++ b/src/main/clojure/clojure/tools/reader.clj @@ -27,6 +27,8 @@ java.util.regex.Pattern (java.util List LinkedList))) +(set! *warn-on-reflection* true) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; helpers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1022,12 +1024,12 @@ ([] (read+string (source-logging-push-back-reader *in*))) ([stream] (read+string stream true nil)) ([^SourceLoggingPushbackReader stream eof-error? eof-value] - (let [^StringBuilder buf (doto (:buffer @(.source-log-frames stream)) (.setLength 0)) + (let [^StringBuilder buf (doto ^StringBuilder (:buffer @(.source-log-frames stream)) (.setLength 0)) o (log-source stream (read stream eof-error? eof-value)) s (.trim (str buf))] [o s])) ([opts ^SourceLoggingPushbackReader stream] - (let [^StringBuilder buf (doto (:buffer @(.source-log-frames stream)) (.setLength 0)) + (let [^StringBuilder buf (doto ^StringBuilder (:buffer @(.source-log-frames stream)) (.setLength 0)) o (log-source stream (read opts stream)) s (.trim (str buf))] [o s])))