Skip to content

Commit fca54e2

Browse files
committed
Deal with reflection warning
1 parent 9385b67 commit fca54e2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/clj/hickory/core.clj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,17 @@
144144
([this] (trampoline as-hickory this (hzip/hickory-zip this)))
145145
([this loc] (end-or-recur as-hickory loc (.getWholeText this)))))
146146

147+
;; Jsoup/parse is polymorphic, we'll let reflection handle it for now
148+
(set! *warn-on-reflection* false)
149+
147150
(defn parse
148151
"Parse an entire HTML document into a DOM structure that can be
149152
used as input to as-hiccup or as-hickory."
150153
[s]
151154
(Jsoup/parse s))
152155

156+
(set! *warn-on-reflection* true)
157+
153158
(defn parse-fragment
154159
"Parse an HTML fragment (some group of tags that might be at home somewhere
155160
in the tag hierarchy under <body>) into a list of DOM elements that can

0 commit comments

Comments
 (0)