Skip to content

Commit

Permalink
Fix clojure clr json-buffer reflection waring
Browse files Browse the repository at this point in the history
  • Loading branch information
djblue committed Apr 3, 2023
1 parent e0e366a commit 54be295
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/portal/runtime/json_buffer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
:cljr
(volatile!
(seq
(JsonNode/Parse data
(JsonNode/Parse ^String data
(JsonNodeOptions.)
(JsonDocumentOptions.))))
:clj
Expand Down Expand Up @@ -117,8 +117,9 @@
#?(:bb (let [v (first @buffer)] (vswap! buffer rest) v)
:cljr
(let [result
(when-let [value (some-> ^JsonValue (first @buffer)
(.GetValue (type-args JsonElement)))]
(when-let [^JsonElement value
(some-> ^JsonValue (first @buffer)
(.GetValue (type-args JsonElement)))]
(condp identical? (.ValueKind value)
JsonValueKind/String (.GetString value)
JsonValueKind/False false
Expand Down

0 comments on commit 54be295

Please sign in to comment.