Skip to content

Commit 4dab0c2

Browse files
committed
Add type hints for encode/decode
GraalVM requires type hints to disambiguate URLEncoder/encode and URLDecoder/decode method invocations.
1 parent b01fcee commit 4dab0c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ring/util/codec.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191

9292
(extend-protocol FormEncodeable
9393
String
94-
(form-encode* [unencoded encoding]
94+
(form-encode* [^String unencoded ^String encoding]
9595
(URLEncoder/encode unencoded encoding))
9696
Map
9797
(form-encode* [params encoding]
@@ -125,7 +125,7 @@
125125
or UTF-8 by default."
126126
([encoded]
127127
(form-decode-str encoded "UTF-8"))
128-
([^String encoded encoding]
128+
([^String encoded ^String encoding]
129129
(try
130130
(URLDecoder/decode encoded encoding)
131131
(catch Exception _ nil))))

0 commit comments

Comments
 (0)