Java 20 deprecation cleanup
This commit is contained in:
parent
52106f896d
commit
0202ca0be6
1 changed files with 4 additions and 4 deletions
|
@ -40,8 +40,8 @@ import org.xml.sax.InputSource
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.io.StringReader
|
import java.io.StringReader
|
||||||
import java.net.MalformedURLException
|
import java.net.URI
|
||||||
import java.net.URL
|
import java.net.URISyntaxException
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
import java.time.ZonedDateTime
|
import java.time.ZonedDateTime
|
||||||
|
@ -309,8 +309,8 @@ open class PinboardPoster() {
|
||||||
var isValid = url.isNotBlank()
|
var isValid = url.isNotBlank()
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
try {
|
try {
|
||||||
URL(url)
|
URI(url)
|
||||||
} catch (e: MalformedURLException) {
|
} catch (e: URISyntaxException) {
|
||||||
logger.log(Level.FINE, "Invalid URL: $url", e)
|
logger.log(Level.FINE, "Invalid URL: $url", e)
|
||||||
isValid = false
|
isValid = false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue