Skip to content

Commit

Permalink
refactor: replace deprecated URL() call with URI.toURL()
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmasB committed Jan 7, 2024
1 parent 4f4f808 commit 9504e79
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -18,6 +18,7 @@ import javafx.scene.image.Image
import javafx.scene.image.ImageView
import javafx.scene.image.WritableImage
import javafx.scene.paint.Color
import java.net.URI
import java.net.URL

/**
Expand Down Expand Up @@ -425,7 +426,7 @@ class TilesetLoader(private val map: TiledMap, private val mapURL: URL) {
val image = try {
val ext = mapURL.toExternalForm().substringBeforeLast("/") + "/"

val stream = URL(ext + tilesetImageName).openStream()
val stream = URI.create(ext + tilesetImageName).toURL().openStream()

var img = if (transparentcolor.isEmpty())
Image(stream)
Expand Down

0 comments on commit 9504e79

Please sign in to comment.