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:
+1
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user