@@ -24,7 +24,6 @@ internal object Utils {
2424 * @param options Optional decode options for merging behavior.
2525 * @return The merged object.
2626 */
27- @JvmStatic
2827 fun merge (target : Any? , source : Any? , options : DecodeOptions = DecodeOptions ()): Any? {
2928 if (source == null ) {
3029 return target
@@ -199,7 +198,6 @@ internal object Utils {
199198 * https://developer.mozilla.org/en-US/docs/web/javascript/reference/global_objects/escape
200199 */
201200 @Deprecated(" Use URLEncoder.encode instead" )
202- @JvmStatic
203201 fun escape (str : String , format : Format = Format .RFC3986 ): String {
204202 val buffer = StringBuilder ()
205203
@@ -243,7 +241,6 @@ internal object Utils {
243241 * https://developer.mozilla.org/en-US/docs/web/javascript/reference/global_objects/unescape
244242 */
245243 @Deprecated(" Use URLDecoder.decode instead" )
246- @JvmStatic
247244 fun unescape (str : String ): String {
248245 val buffer = StringBuilder ()
249246 var i = 0
@@ -321,7 +318,6 @@ internal object Utils {
321318 * @param format The encoding format to use. Defaults to RFC 3986.
322319 * @return The encoded string.
323320 */
324- @JvmStatic
325321 fun encode (
326322 value : Any? ,
327323 charset : Charset ? = StandardCharsets .UTF_8 ,
@@ -441,7 +437,6 @@ internal object Utils {
441437 * @param charset The character set to use for decoding. Defaults to UTF-8.
442438 * @return The decoded string, or null if the input is null.
443439 */
444- @JvmStatic
445440 fun decode (str : String? , charset : Charset ? = StandardCharsets .UTF_8 ): String? {
446441 val strWithoutPlus = str?.replace(' +' , ' ' )
447442
@@ -473,7 +468,6 @@ internal object Utils {
473468 * @param root The root of the Map or List structure to compact.
474469 * @return The compacted Map or List structure.
475470 */
476- @JvmStatic
477471 fun compact (root : MutableMap <String , Any ?>): MutableMap <String , Any ?> {
478472 val stack = ArrayDeque <Any >()
479473 stack.add(root)
@@ -545,7 +539,6 @@ internal object Utils {
545539 * @param b The second object to combine.
546540 * @return A list containing the combined elements.
547541 */
548- @JvmStatic
549542 fun <T > combine (a : Any? , b : Any? ): List <T > {
550543 val result = mutableListOf<T >()
551544
@@ -573,7 +566,6 @@ internal object Utils {
573566 * @param fn The function to apply.
574567 * @return The result of applying the function, or null if the input is null.
575568 */
576- @JvmStatic
577569 fun <T > apply (value : Any? , fn : (T ) -> T ): Any? =
578570 when (value) {
579571 is Iterable <* > -> {
@@ -594,7 +586,6 @@ internal object Utils {
594586 * @param skipNulls If true, empty Strings and URIs are not considered non-nullish.
595587 * @return True if the value is a non-nullish primitive, false otherwise.
596588 */
597- @JvmStatic
598589 fun isNonNullishPrimitive (value : Any? , skipNulls : Boolean = false): Boolean =
599590 when (value) {
600591 is String -> if (skipNulls) value.isNotEmpty() else true
@@ -618,7 +609,6 @@ internal object Utils {
618609 * @param value The value to check.
619610 * @return True if the value is empty, false otherwise.
620611 */
621- @JvmStatic
622612 fun isEmpty (value : Any? ): Boolean =
623613 when (value) {
624614 null ,
@@ -636,7 +626,6 @@ internal object Utils {
636626 * @param str The input string potentially containing numeric entities.
637627 * @return A new string with numeric entities replaced by their corresponding characters.
638628 */
639- @JvmStatic
640629 fun interpretNumericEntities (str : String ): String {
641630 if (str.length < 4 ) return str
642631 val first = str.indexOf(" &#" )
0 commit comments