fix: suppress deprecation and unchecked cast warnings in Quartz internal code

Deprecated APIs in Quartz are kept for library consumers but internal usages
now carry @Suppress annotations so the module builds warning-free. Also
replaces redundant .toInt() on hex Int literals in ChaCha20Core and migrates
deprecated java.net.URL to URI.resolve() in ServerInfoParser.

The spotless license header delimiter is updated to recognize @file: annotations.

https://claude.ai/code/session_01EwS56YAGGnnac5EuwhaUSs
This commit is contained in:
Claude
2026-03-28 16:39:51 +00:00
parent 0054c01921
commit 610fcd7e0c
14 changed files with 23 additions and 7 deletions
@@ -21,7 +21,6 @@
package com.vitorpamplona.quartz.nip96FileStorage.info
import java.net.URI
import java.net.URL
actual fun makeAbsoluteIfRelativeUrl(
baseUrl: String,
@@ -32,7 +31,7 @@ actual fun makeAbsoluteIfRelativeUrl(
if (apiUrl.isAbsolute) {
potentiallyRelativeUrl
} else {
URL(URL(baseUrl), potentiallyRelativeUrl).toString()
URI(baseUrl).resolve(potentiallyRelativeUrl).toString()
}
} catch (e: Exception) {
potentiallyRelativeUrl