Skip to content

Commit 2af4505

Browse files
JarrodCTaylorbronsa
authored andcommitted
TRDR-72 Added type hint to suppress reflection warning
1 parent 2930acf commit 2af4505

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/clojure/clojure/tools/reader.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
java.util.regex.Pattern
2828
(java.util List LinkedList)))
2929

30+
(set! *warn-on-reflection* true)
31+
3032
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3133
;; helpers
3234
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1022,12 +1024,12 @@
10221024
([] (read+string (source-logging-push-back-reader *in*)))
10231025
([stream] (read+string stream true nil))
10241026
([^SourceLoggingPushbackReader stream eof-error? eof-value]
1025-
(let [^StringBuilder buf (doto (:buffer @(.source-log-frames stream)) (.setLength 0))
1027+
(let [^StringBuilder buf (doto ^StringBuilder (:buffer @(.source-log-frames stream)) (.setLength 0))
10261028
o (log-source stream (read stream eof-error? eof-value))
10271029
s (.trim (str buf))]
10281030
[o s]))
10291031
([opts ^SourceLoggingPushbackReader stream]
1030-
(let [^StringBuilder buf (doto (:buffer @(.source-log-frames stream)) (.setLength 0))
1032+
(let [^StringBuilder buf (doto ^StringBuilder (:buffer @(.source-log-frames stream)) (.setLength 0))
10311033
o (log-source stream (read opts stream))
10321034
s (.trim (str buf))]
10331035
[o s])))

0 commit comments

Comments
 (0)